Reputation: 4218
I got a problem with JWPlayer, which happened only lately (means was working with this exact code). I'm getting "No suitable players found" using youtube links. my setup is as follows:
jwplayer("mediaplayer2").setup({
flashplayer: "php/jwplayer/player.swf",
file: "https://www.youtube.com/watch?v=IsYAoR7hfPE",
autostart: true,
controls: false,
logo: "http://...",
"logo.link": "tracker2.php","logo.hide":false,
controlbar: "over",
"controlbar.idlehide": "true",
"controlbar.hide": "true",
image: "php/jwplayer/preview.jpg",
screencolor: "000000",
width: "500",
height: "300",
stretching: "fill",
skin: "php/jwplayer/skins/bekle.zip",
abouttext: "Flash Player",
aboutlink: "http://...",
events: {
onPause: function() {
if(success != 1)
this.play(true);
},
onComplete: function() {
//this.stop();
//$.post('php/jwplayer/callback.php');
if(success == 1)
{
this.stop();
}
},
onError: function(message)
{
alert(message);
console.log(message);
},
onSetupError: function(fallback,message)
{
alert(message);
console.log(message);
}
}
});
how can I fix this?
Upvotes: 1
Views: 3032
Reputation: 4288
The problem is with the youtubevideo you are using, it is a private video. To know more on how to embed youtube video in jwplayer check out this
This is the error i am getting in the console
Object
message: "Error loading YouTube: Video removed or private"
type: "jwplayerError"
__proto__: Object
Check this link and comments on this question, you can not play private youtube videos in jwplayer.
I have made simple demo to show jwplayer with youtube
Check this JSFIDDLE
jwplayer("mediaplayer2").setup({
file: "https://www.youtube.com/watch?v=efuICQgCWLA",
autostart: true,
// controls: false,
width: "500",
height: "300",
stretching: "fill",
});
Also check this trouble shooting guide here
Error loading YouTube: Video removed or private This means the YouTube video has been removed (for any reason), or it has been marked as private by the owner of the video.
Upvotes: 2