jwplayer6 - jwplayer captions - close by default -


i don't want caption show on startup.

i added this:

tracks: [{    file : 'subtitles/file.vtt',     kind: 'captions',    "default" : false }], captions: {    color: '#fff',    fontsize: 20,    backgroundcolor: '#006666',    kind: 'captions' }, 

this doesn't work. tried without 'default': false (the default off)

the "kind" parameter belongs in tracks block, not in captions block. nevertheless, have same problem. whether setting "default" false or omitting parameter, captions on when player starts up. can fix adding

playerinstance.setcurrentcaptions(0); 

after setup. in of configurations prevented player obeying pause command (by javascript), had this:

var s = 0; playerinstance.onplay(function() {     if(s==0){     playerinstance.setcurrentcaptions(0);     s=1;    } }); 

the s variable makes sure captions not turned off on subsequent pause/play actions in case user turns them on. assume using jwplayer version 7. captions .srt, way.


Comments

Popular posts from this blog

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -