Hello-
I just updated to Newspaper X this morning, and since then I’ve been having problems with embedded videos that use a (custom) javascript to skip to cue points in the video. Instead of capturing the “onYouTubeIframeAPIReady” event, it conks out and is unable to talk to the video player iframe. I have the jsapi enabled and, frankly, had this working fine in Newspaper 9. Is there something I can do to enable iframe interaction?
https://waterdesk.org/2020/08/data-vis-for-water-journalism-water-buffs-podcast-ep-1-geoff-mcghee
I enabled a Youtube Data API key, but I don’t think this has anything to do with that. One clue is that after going to Newspaper X, the embed I had (with url watch/etc) stopped working because of cross domain iframe settings from Youtube that weren’t a problem in the older newspaper theme. I suspect you’ve changed the YT api version or something. But I searched around and it seems that the YT IFrame API is still supported by Youtube.
Thanks.
Here’s a working example of the UI:
http://geoffmcghee.com/temp/wd-youtube/waterbuffs-20200824-01.html
Hi,
I just checked your website and the youtube video is working now -> https://i.imgur.com/ycplzMh.png as for the (custom) javascript I do not know how this should work to can help you.
If there is still a problem, let me know!
Thank you!
Thanks for your quick reply. Yes, the video works, but I’m unable to access it programmatically with the IFrame API. My question is how might I disable the new video support JS that came with the Newspaper X theme. It seems to be using embedly or some other video library like video.js to enable the sticky video and other behaviors. The event listeners for that are blocking out my listeners for youtube events.
To understand how it should work, I’d love it if you could look at this link and click on one of the chapter descriptions below the video. The video will play and queue to a time stamp.
-
This reply was modified 5 years by
mitchtobin.
-
This reply was modified 5 years by
mitchtobin.
Hi,
The theme is using https://www.youtube.com/iframe_api this is use in these files:
-> wp-content/plugins/td-composer/legacy/Newspaper/js/tagdiv_theme.min.js and wp-content/plugins/td-composer/mobile/js/tagdiv_theme.min.js
Hope this will help you!
That’s super helpful, thanks! It looks like we were both loading it, so when I added it as an inline js my code started winning the race. Now the sticky video functionality doesn’t work but mine is more important. Thank you so much for the additional information.