Closed scott97 closed 6 months ago
I have had some success using videojs to play youtube videos without the suggested videos on pause. However, videojs -youtube does not work within the shadow dom and is broken. videojs-voutube works fine when created in the lightdom. videojs with mp4 videos is fine so it must be this particular plugin. I have had no luck figuring out why it is
https://github.com/vidstack/player looks promising
I've started investigating possible solutions.
Youtube's iframe API does not support removing the suggested videos - this feature was removed. We cannot use document.querySelector to find and remove the obstructing elements in the iframe, because of the same-origin policy. Slowing the playback speed down to 0 is not possible, the API sets a minimum of 0.25 playback speed. Repeatedly seeking to the same time is a solution but we are limited in how many times we can do it per second, the video plays on a loop which looks bad.