
JWplayer7 multiple players failed
I have two players need to be control
<div id="video"></div>
<div id="cobrowse"></div>
These two will be actived at any time
Now, the question is:
While I setup the JWplayer for id="video" element, that works well.
Then I setup the JWplayer for id="cobrowse" element, this do nothing.
So, I open the developer tool on Chrome, and type jwplayer("cobrowse").getConfig(), that return some error messages.
Here it is:
Uncaught TypeError: Cannot read property 'apply' of undefined
at e.each.t.(anonymous function) [as getConfig] (https://apac01.dev.aptilonlive.com/dmo01/script/jwplayer/jwplayershaka.js?d=1111385066:9:17163)
at <anonymous>:2:25
at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
And here is my config for cobrowse element:
jwplayer("cobrowse_jw").setup({
playlist: [{
sources: [{
file: 'rtmps://' + cbUrl + mId
},{
file: 'http://' + cbUrl + mId + '/playlist.m3u8'
},{
file: 'rtsp://' + cbUrl + mId
}],
}],
width: '100%',
height: '100%',
primary: "html5",
rtmp: {
bufferlength: 0.1,
},
events: {
onReady: function (event) {
// console.log(event);
},
onPause: function (event) {
// this.play();
},
onError: function (event) {
// console.log(event);
},
onSetupError: function (event) {
// console.log(event);
}
}
}).setControls(false);
Is that JWplayer7 not support multiple players?
Thanks
Asa