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

How to check if jwplayer is playing with HTML5 or flash using javascript API


I am using Jw Player version 6.9 and i would like to know whether jwplayer is playing with HTML5 or Flash player using Javascript API in my browser?

I have set HTML5 as primary but still its playing using JW Flash Player in some firefox versions.

Please suggest me if any one will have any solution for this

4 Community Answers

developer

User  
1 rated :

try the following:

jwplayer("yourID").setup({
//Here your setup parameter
}).onReady(function(){
if(this.getState()!="PLAYING"){
//Here what you want to check...
}
});


it should be work in HTML5 and Flash...

Todd

JW Player Support Agent  
1 rated :

You can check the rendering mode by right-clicking on the player, or via the API:

jwplayer().onReady(function(){
console.log(jwplayer().getRenderingMode());
});

Please note that some versions of Firefox cannot natively play MP4s, so our player will load in Flash mode.

Kind regards,
Todd

marmikmamu

User  
0 rated :

Hi, is there any way i can run two different skin one for flash and one for html5?

Todd

JW Player Support Agent  
0 rated :

You cannot change the skin via an API call, but you could potentially detect Flash first and then load the player using the desired skin.

This question has received the maximum number of answers.