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

http streaming to iOS m3u8 stops playing


Here is a link to my test page:
http://lcc.org/media/live/?golive=true

The Flash to HTML5 fallback is working great. But for some reason the m3u8 file on iOS only plays about 5 seconds. If i browse to the m3u8 file directly it will stream uninterrupted.

Is there a setting in the JWPlayer setup that I need to configure to tell the player this is a streamed video, so it will continue playing.
bc.. <script type="text/javascript">
jwplayer("container").setup({
height: 360,
width: 640,
skin:"/common/player/bekle/bekle.zip",
modes: [
{type: 'flash',src: '/common/player/player.swf',
config:{
streamer:"rtmp://cp54218.live.edgefcs.net/live/",
file:"Legacy_Church_KS_1@53604",
"rtmp.subscribe":true
}
},
{type: 'html5',
config: {
'file': 'http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8',
'provider': 'http'
}
}
]

});

</script>

21 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Remove – ‘provider’: ‘http’

You can also test here – http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/m3u8.html

JW Player

User  
0 rated :

I removed 'provider', still doesn't work properly. (It only plays about 3-5 seconds).

I pasted the URL of my m3u8 into the test page that you provided. It does exactly the same thing. It plays about 3-5 seconds, then stops.


Here is my m3u8 URL:
http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8

Ethan Feldman

JW Player Support Agent  
0 rated :

You need to add it in a single levels block for it to work.

JW Player

User  
0 rated :

Sorry, I don't understand what you mean by a single levels block.

Ethan Feldman

JW Player Support Agent  
0 rated :

Change:

config: {
‘file’: ‘http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8’,
‘provider’: ‘http’
}

To:

config: {
levels: [
‘file’: ‘http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8’
],
‘provider’: ‘video’
}

JW Player

User  
0 rated :

I was excited that this would be the solution, but something isn't allowing it to create the object.

I don't see any obvious type-o's, but it is not replacing the content of the DIV.

Ethan Feldman

JW Player Support Agent  
0 rated :

Sorry, change:

config: {
levels: [
‘file’: ‘http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8’
],
‘provider’: ‘video’
}

To:

config: {
levels: [
‘file’: ‘http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8’,
‘provider’: ‘video’
]
}

JW Player

User  
0 rated :

That is not doing it either. It's still not replacing the content of the DIV.

Ethan Feldman

JW Player Support Agent  
0 rated :

Try this code:

<script type="text/javascript">
    jwplayer("container").setup({        
        height: 360,
        width: 640,
skin:"/common/player/bekle/bekle.zip",   
modes: [
{type: 'flash',src: '/common/player/player.swf',
   config:{  
   streamer:"rtmp://cp54218.live.edgefcs.net/live/",
file:"Legacy_Church_KS_1@53604",
"rtmp.subscribe":true
}
},
{
          type: 'html5',
          config: {
           levels: [ {'file': 'http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8'} ],
           'provider': 'video'
          }
        }
    ]
    });
</script>

JW Player

User  
0 rated :

That is it!! This is totally working now.

This was the fix: (Ethan, you rock!)
bc.. config: {
levels: [ {'file': 'http://174.129.242.53/LegacyChristianChurchiPhone/iPhone/playlist.m3u8' } ],
'provider': 'video'
}



Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

JW Player

User  
0 rated :

Using this same code as a base, can you add multiple levels for bandwidth negotiation while still http streaming via m3u8 playlists?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, that is possible to do. http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/15995/jw-embedder-reference-guide#levels

JW Player

User  
0 rated :

I am having the same issue (only plays for a second or 2 on iphone, works fine on computer), however the above code didn't seem to fix it for me. Here is my code:

<span style="font-size: small;"></span><script type="text/javascript" src="/includes/js/jwplayer.js"></script>
<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
width: 640,
height:360,
modes: [
{ type: "flash",
src: "/includes/js/player.swf",
config: {
file: "stream1",
streamer: "rtmpt://servername.com:1935/live",
smoothing: "false",
"hd.state": "true",
wmode: "opaque",
skin: "/includes/js/glow.zip",
bufferlength: 12,
dock: false,
provider: "rtmp"
}
},
{ type: "html5",
config: {
levels: [ {file: "http://servername.com:1935/live/stream1/playlist.m3u8"} ],
provider: "video"
}
}
]
});
</script>


If I use the html5 <video> tag on a separate page it streams fine on iphone, but I'd like to have everything on one page if possible.

Any tips/suggestions would be greatly appreciated!

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link to where you are running this?

JW Player

User  
0 rated :

My stream also stops after 2 seconds on my iPhone. I'm using the latest 5.7 version of JWPlayer.

This is the URL: http://dev.landgraaf.net/index4.html

Ethan Feldman

JW Player Support Agent  
0 rated :

I do not believe you need this line – ‘x-webkit-airplay’: ‘allow’

If you use your m3u8 file on this test location, does it work?

http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/m3u8.html

JW Player

User  
0 rated :

Here's my code, but I'm not sure it's right. I do know, as of the time I write this, the m3u8 stream is broken, but I want to make sure that's ALL that wrong.

bc.. <script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<div id="container">Loading the player ...</div>

<script type="text/javascript">
jwplayer("container").setup({
height: 390,
width: 640,
modes: [
{ type: "flash",
src: "/jwplayer/player.swf",
config: {
levels: [
{ bitrate: 375, file: "remoteLow.flv", width: 480 },
{ bitrate: 720, file: "remoteMed.flv", width: 720 }
],
skin: "jwplayer/beelden.zip",
controlbar: "bottom",
image: "jwplayer/placeholder_image.jpg",
streamer: "rtmp://flashliveeast.gdlcdn.com/203F89/",
provider: "rtmp",
autostart: "true"
}
},
{ type: "html5",
config: {
'image': 'jwplayer/ios_placeholder_image.jpg',
levels: [
{file: "http://globalawakening.ios.gdlcdn.com/remoteiphone/playlist.m3u8"}
],
'provider': 'video'
}
}

]

});
</script>

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link? This code looks fine to me.

JW Player

User  
0 rated :

Hi Ethan,
I'm finding to post an mp4 video to facebook. Actually my Wowza media server streams content of an mp4 file and provides me an m3u8 url.
My question is : Is it possible to pass the m3u8 url via GET without using JS ?
In others words is possible to do as follow:

<object .... src="player.swf?file=/path/*.m3u8" ></object>

or something similar to post my video on facebook and playing it with the default video player as happens for the swf ??
In alternative is possible to use an f4m url ....
Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

Not that I know of I’m afraid.

This question has received the maximum number of answers.