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

m3u8 and mp4 sources conflict


We have a JW Player 6.4.3359 licensed player, and we're trying to present an Apple HLS stream to iOS, and an MP4 to everything else.

We're using a single-item playlist with two sources - the first one is the mp4, the second is the m3u8 for iOS.

Each of the respective files works fine - the issue is that mobile Safari will try to play the mp4, and Chrome will try to play the m3u8.

Is there any way to force JWPlayer to use a particular source for HTML, and a particular source for Flash?

1 Community Answers

Ethan Feldman

JW Player Support Agent  
1 rated :

You would need to use some of your own detection for something like this. Here is some pseudo code:

if (navigator.userAgent.match(/iPad/i) != null || navigator.userAgent.match(/iPhone/i) != null){
//SET UP THE PLAYER WITH THE M3U8 FOR IOS
} else {
//SET UP THE PLAYER WITH THE MP4 FOR NON IOS
}

This question has received the maximum number of answers.