I am using following variables to setup my jwplayer:
jwplayer("my-video").setup({
file: "rtmp://<rtmp_distribution_url>/cfx/st/"+videoFile,
width: "960",
height: "540",
autostart: true,
mute: true,
repeat: true,
modes: [
{ type: "flash", src: "https://<my_cdn_url>/jwplayer.flash.swf"}, { type: "html5" }
]
});
The problem is that the flash player is not loading from my cdn. I have to place the jwplayer.flash.swf in my website's document root which is where it is looking for the player. If I remove the file from document root, I get an error that flash plugin cannot be loaded.
How do I load this file from the CDN? Is there any syntax error in the above code?
Found the answer:
modes is now deprecated. My new config file compatible with jwplayer 7 looks like this:
jwplayer("my-video").setup({
playlist: [{
sources: [{
file: "<rtmp_server_url>/cfx/st/"+videoFile
},{
file: "<cdn_server_url>/"+videoFile
}]
}],
width: "100%",
aspectratio: "16:9",
autostart: true,
mute: true,
repeat: true,
primary: "flash",
flashplayer: "<cdn_server_url>/jwplayer.flash.swf",
skin: {name: "five", url: "<cdn_server_url>/skins/five.css"}
});