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

Play vimeo video in jwplay


Hi,

I have integrated jwplayer(free version) for playing content. Playing vimeo video is not working in jwplayer. Please guide me. I used same code in jwplayer demo page. Showing error loading media: file not found.

<html>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript' src='jwplayer.js'></script>
<script>jwplayer.key="Xrk6i/D5KfMnBpff8v82Hk1a4WUEYE7wzrZYSA=="</script>
<body>
<div id="myElement">test</div>
<script type="text/javascript">
function formatContent(text){
if (text) {
text = text.replace(
/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi,
function(url){
var full_url = url;
if (!full_url.match('^https?:\/\/')) {
full_url = 'http://' + full_url;
}
return '' + url + '';
}
).replace(/(\r\n|\r|\n)/g, "");
}
return text;
}

function showInfo(data) {
$('#tags-content').html(data.tags.join(","));

$('#description').html(formatContent(data.content));

$('#content-container').show();

}

function showFlashInfo(data) {
$('#tags-content').html(data.tags);

$('#description').html(formatContent(data.description));

$('#content-container').show();
}


(function(jwplayer) {

var player = jwplayer("myElement").setup({
width: 660,
height: 350,
playlist: [
{ start: 30, file: "http://vimeo.com/1084537", type: "mp4", title: "Big Buck Bunny", author: "Blender Foundation", videoDuration: "9.56", image: "http://b.vimeocdn.com/ts/209/636/20963649_640.jpg" },
{ file: "http://vimeo.com/1132937", type: "mp4", title: "Elephants Dream", author: "Blender Foundation", videoDuration: "10.54", image: "http://b.vimeocdn.com/ts/209/725/20972598_640.jpg" },
{ file: "http://vimeo.com/28103524", type: "mp4", title: "Les chiens isolés", author: "CRCR", videoDuration: "6.32", image: "http://b.vimeocdn.com/ts/205/905/205905221_640.jpg" },
{ file: "http://vimeo.com/17922322", type: "mp4", title: "Junkspace", author: "CRCR", videoDuration: 0.55, image: "http://b.vimeocdn.com/ts/130/627/130627553_640.jpg" },
{ file: "http://vimeo.com/16051959", type: "mp4", title: "TODOR and PETRU", author: "CRCR", videoDuration: "2.45", image: "http://b.vimeocdn.com/ts/205/911/205911527_640.jpg" },
{ file: "http://vimeo.com/15160326", type: "mp4", title: "Red River Bay", author: "CRCR", videoDuration: "1.07", image: "http://b.vimeocdn.com/ts/130/627/130627947_640.jpg" },

],
vimeo: {
//not required
enableApiData: true

}
});

player.on("ready",function() {

player.on("vimeodata",function(data) {
showInfo(data);
});

});


})(window.jwplayer);
</script>


Thanks,

Premkumar M

1 Community Answers

Donni

JW Player Support Agent  
0 rated :

You need to point the player to an actual stream or video file.

This question has received the maximum number of answers.