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

Dynamically load video


Hey i'm having issues when I want to load a new video in the player, it shows this error:

Error loading player:
No playable sources found

and in the console says: Uncaught TypeError: Cannot read property 'googima' of undefined (jwplayer.js:128)

My code is this:

jwplayer('video_player').setup({
'flashplayer': 'js/jwplayer/jwplayer.flash.swf',
'controlbar': 'bottom',
'width': '596',
'height': '374'
});


$(".media").on('click', function(e) {
var $item = $(this);
var video = $item.attr('data-video');
var image = $item.attr('data-image');

if (typeof video != 'undefined') {

var new_video = {
file: video,
image: (typeof image != 'undefined') ? image : ""
};

jwplayer().load(new_video);
jwplayer().play();


}
e.preventDefault();
});

what is wrong?

help me please.

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

You cannot configure our player without an initial video, so you will need to include a video URL in your file: ’’ parameter in your initial jwplayer().setup before you can load a different video via your load() call.

This question has received the maximum number of answers.