videojs / videojs-youtube

YouTube playback technology for Video.js
1.12k stars 548 forks source link

Let videojs handle fullscreen with ytControls active #589

Open cabellonic opened 3 years ago

cabellonic commented 3 years ago

I'm using this plugin in my React project to add my own subtitles to youtube videos and it works really well. But unfortunately there is no way to disable the original subtitles and sometimes they overlap each other.

I activated the youtube controls so that the user can disable the youtube subtitles, but when I enter in fullscreen mode by double clicking or through the youtube controls logically my subtitles do not appear.

<video ref={videoRef} className="video-js vjs-default-skin" data-setup={'{"youtube": { "cc_load_policy": "0", "ytControls": "2" } }'} />

I wanted to know if there is any way to modify the iframe attributes (allowfullscreen and so on) before it's generated so that the user can only toggle fullscreen mode with the videojs controls.

Thank you beforehand