Should I use .setup to switch the video file in jwplayer?

When changing the video file on the page, I would think that jwplayer().file(embedurl);(or the like) would be fine, and all the previous embed properties would be preserved. However, I cannot find anything like this, and the documentation suggests that I will basically have to configure everything again:

jwplayer().setup({ 
    file: embedurl, 
    height: 360,
    width: 640 
});

What is the easiest way to disable vid with a new one?

+4
source share
1 answer

The easiest way is to use: jwplayer.load([{file, image}]);

file may be a single video or audio file or RSS playlist.

image not required.

Ref. http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference

, Ctrl + F ".load" JW Player , , , . .

+2

All Articles