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

Configuring Multiple Source


At Configuring Multiple Sources page (https://support.jwplayer.com/customer/portal/articles/1710454-configuring-multiple-sources), It is the following example:
var playerInstance = jwplayer("myElement");
playerInstance.setup({
playlist: [{
sources: [{
file: "//mySite.com/myFile.flv"
},{
file: "//mySite.com/myFile.mp4"
},{
file: "//mySite.com/myFile.webm"
}]
}],
primary: "flash"
});
Here, the player will attempt to load an FLV file, which requires Flash. If Flash is not detected,
we'll head down the list and try our MP4 file in HTML5 mode. If our browser is still not capable
of playing an MP4 natively, we'll lastly attempt to play a WebM version.

Question: there is a way to be able to detect, via script, what is the active file used by JW Player?

1 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

You can get the URL of whatever source is playing in the player via the .getPlaylistItem().file API method. For more information on our JavaScript API, please see our JavaScript API Reference.

Thank you.

This question has received the maximum number of answers.