javascript - Why does the video-js endcard plugin add native controls to the player? -


endcard plugin video-js html5 video player inserts links @ end of video. (info on endcard: https://github.com/theonion/videojs-endcard). insert endcard, need videojs.endcard.js, plus css styling.

but... problem is, in cases endcard strips videojs custom controls off video , replaces them native controls. examples...

please note:

  • looks happens on mobiles. on pc, both videos have styled videojs controls in chrome, ff , ie.

  • it doesn't happen on mobiles - there's no problem in safari , opera on ipad, in chrome on ipad, video 2 has videojs controls , then, on refresh, has native controls (when happens, video won't load).

  • where video 2 "native" in google chrome developer tools (pc) - looks ok, after reload it's not. using developer tools see in html of video 2 (the 1 endcard), css class "vjs-using-native-controls" (which means display:none videojs controls) being added video div. isn't being added in generated source in firefox web developer.

i've tested 2 files see may causing , have boiled down javascript @ end of html in video 2. if delete it, player gets styled controls in chrome (ipad) , chrome developer tools.

hmm, maybe problem chrome? anyway, have idea conflict arises, why on mobiles, , how fix it?

it's not plugin, rather different way player initialised on second page. player options can passed second argument videojs function:

var video = videojs('video', {"nativecontrolsfortouch": false} ); 

Comments