Hi all,
I am trying to add peertube support to our CMS. It currently supports YouTube so trying to adapt their approach to embedding youtube to peertube. Their code dynamically adds the player script to the page rather than having it present in the header statically. They use jquery to add a script tag and point the « src » attribute at the cdn. Once fully loaded the script then creates a « new YouTubePlayer() ». To do this they implement a callback function onYouTubeIframeAPIReady
. I can’t seem to find an similar callback for the peertube api?
I have tried different ways to accommodate this but my JavaScript skills are not strong enough Waiting for the script to be added to the header alone doesn’t work. (async:false,defer:false) nor does the jquery « .ready » functions after the script is added. I just get « PeerTubePlayer undefiend »
Any help appreciated.