Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Not showing anything even the play button


This is my setup for jwplayer and a load function to change stream:
jwplayer("cobrowse").setup({
playlist: [{
sources: [{
file: 'tempfile'
}]
}],
width: '100%',
primary: "flash",
height: '100%',
rtmp: {
bufferlength: 0.1
},
events: {
onReady: function(event) {
console.log('onready');
console.log(event);
},
onPause: function(event) {
// this.play();
},
onError: function(event) {
console.log(event);
},
onSetupError: function(event) {
console.log('onSetupError');
console.log(event);
}
}
});

function changeJWurl(url) {
jwplayer().load([{file: url}]);
}

But, while I load it, the "cobrowse" element just became black and show nothing.
And I can't use .play(), .pause() and .stop().
That seems it doesn't setup because onReady haven't been fired.

4 Community Answers

MisterNeutron

User  
0 rated :

Please give us a link to your site. Your setup coding appears to be very inventive, to say the least. You can't put API calls in the setup block, just for starters.

karoteglathe

User  
0 rated :

And the server side is JAVA, client is jsp.

karoteglathe

User  
0 rated :

Hi MisterNeutron,

Sorry about that the site is private. But I got the problem. I put the player.swf in the wrong folder. While I move it to the folder where jwplayer.js is, it works.

MisterNeutron

User  
0 rated :

If you're using player.swf, you're using JW Player 5. Very obsolete.

This question has received the maximum number of answers.