You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like at some point we lost the ability to initialize a plugin via the plugins options object. Using the plugins example in sandbox:
Works fine
progressed=function(options){this.on('progress',function(e){console.log(this.bufferedPercent());});};// register the pluginvideojs.plugin('progressed',progressed);// initialize itvid1=videojs('vid1');vid1.progressed();
Sadness
varprogressed=function(options){this.on('progress',function(e){console.log(this.bufferedPercent());});};videojs.plugin('progressed',progressed);varvid1=videojs('vid1',{plugins: {progressed: true}});// => Uncaught TypeError: Cannot assign to read only property 'playerOptions' of true
The text was updated successfully, but these errors were encountered:
The issue is progressed: true. It expects an object for plugin options (not a boolean) and tries to add the player options to it. We probably broke it when we started passing playerOptions around.
heff
added a commit
to heff/video.js
that referenced
this issue
Sep 1, 2015
...because it caused an error, and it actually creates an inconsistent
plugin init process, when considering plugins that are initialized
outside of the player init.
fixesvideojs#2510
Looks like at some point we lost the ability to initialize a plugin via the
plugins
options object. Using the plugins example in sandbox:Works fine
Sadness
The text was updated successfully, but these errors were encountered: