PublicRadioInternational/embed-containers

Embed type videos are not showing a preview

Closed this issue · 4 comments

screen shot 2016-04-29 at 10 13 02 am

Videos are not rendering a preview for me. Not a huge thing but want to note. Thanks.

I'll look into this in case it is an issue caused by implementation in admin app.

@ethorne This is an admin app issue. Looks like Angular's security layer was preventing video embed markup from loading from iframely.com (Is this a new approach?). Adding their embed API domain to our whitelist of trusted URL's fixes the preview issue on our end.

@rpeterman-gp can this be closed then? Is there something we can do that will make integration easier going forward?

Yes, this can be closed. In the future we may want to not use iframely as the source of the markup used for the video embed iframes, or look at moving the request from when the embed is being rendered to when the embed data is being saved. Both options will require some effort The former requiring development of parsing routines for each supported video service URL's, and the latter would require refactoring methods used to save embeds so async loads are accounted for, probably by passing and returning promises.

Just a FYI, synchronous XMLHttpRequests have bee deprecated and may not be supported by the major browsers in the near future. Any code that depends on the synchronous loading of data, such as the request to iframely here, could break.