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
When I create the first player everything works fine but trying to create a second player causes an error TypeError: Cannot redefine property: chapters this stops a second player from being created.
Full stack trace Uncaught TypeError: Cannot redefine property: chapters at Function.defineProperties (<anonymous>) at Chapter.patchPlayer (bundle.js:102149:12) at Chapter.init (bundle.js:102092:10) at bundle.js:102103:14 at bundle.js:103025:39 at Array.forEach (<anonymous>) at Events.trigger (bundle.js:103025:25) at Player.update (bundle.js:103421:19) at Player.initAudio (bundle.js:103244:12) at new Player (bundle.js:103082:10)
An example of how I am creating the player, this is triggered by button press when a user needs to create a player.
Did you register the plugin twice? The plugin is registered once, applied to every instance.
There's also an error in your snippet, it should be chapters instead of Chapter: chapters
I include a working fiddle here with two players powered by the chapter plugin for you to check and debug.
When I create the first player everything works fine but trying to create a second player causes an error
TypeError: Cannot redefine property: chapters
this stops a second player from being created.Full stack trace
Uncaught TypeError: Cannot redefine property: chapters at Function.defineProperties (<anonymous>) at Chapter.patchPlayer (bundle.js:102149:12) at Chapter.init (bundle.js:102092:10) at bundle.js:102103:14 at bundle.js:103025:39 at Array.forEach (<anonymous>) at Events.trigger (bundle.js:103025:25) at Player.update (bundle.js:103421:19) at Player.initAudio (bundle.js:103244:12) at new Player (bundle.js:103082:10)
An example of how I am creating the player, this is triggered by button press when a user needs to create a player.
I've checked all the variables exist and so do the test files. Thanks
The text was updated successfully, but these errors were encountered: