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

M3u8 clean, working streaming code


I have everything working here but I'm trying to get clean display code without the javascript and I can't get it working.

I'm using this base code




<script type='text/javascript' src='http://oxforddigital.tv/streaming/ios/jwplayer.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://oxforddigital.tv/streaming/ios/player.swf',
'file': 'livehttp?adbe-live-event=liveevent',
'image': '',
'bufferlength': '2',
'streamer': 'rtmp://ec2-54-246-6-26.eu-west-1.compute.amazonaws.com/livepkgr',
'controlbar': 'over',
'autostart': 'true',
'stretching': 'exactfit',
'width': '640',
'height': '360',

'modes': [
{type: 'flash', src: 'http://oxforddigital.tv/streaming/ios/player.swf'},
{
type: 'html5',
config: {
levels: [
'file': "http://d4bej95zf4xye.cloudfront.net/hls-live/livepkgr/_definst_/liveevent/livehttp.m3u8"],
'provider': 'video'
}
}
]
});
</script>

and I get This text will be replaced

Does anyone have clean sample code for me? Ethan :)?

19 Community Answers

JW Player

User  
0 rated :

Sorry - I have this working http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/m3u8.html

but I want the update stream stuff stripped out and for the life of me can't figure this last bit out

JW Player

User  
0 rated :

my page - http://oxforddigital.tv/streaming/ios/apple.html

Ethan Feldman

JW Player Support Agent  
0 rated :

Use this code:

<script type='text/javascript' src='http://oxforddigital.tv/streaming/ios/jwplayer.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://oxforddigital.tv/streaming/ios/player.swf',
'file': 'livehttp?adbe-live-event=liveevent',
'image': '',
'bufferlength': '2',
'streamer': 'rtmp://ec2-54-246-6-26.eu-west-1.compute.amazonaws.com/livepkgr',
'controlbar': 'over',
'autostart': 'true',
'stretching': 'exactfit',
'width': '640',
'height': '360',
'modes': [
{type: 'flash', src: 'http://oxforddigital.tv/streaming/ios/player.swf'},
{
type: 'html5',
config: {
levels: [
{'file': 'http://d4bej95zf4xye.cloudfront.net/hls-live/livepkgr/_definst_/liveevent/livehttp.m3u8',
'provider': 'video'}
]
}
}
]
});
</script>

JW Player

User  
0 rated :

Thanks Ethan will report back :)

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

JW Player

User  
0 rated :

Hi Ethan, this works in Safari and Chrome but give me the "this text must be replaced message only in IOS

http://oxforddigital.tv/streaming/ios/ethan.html

Live as of now...

Ethan Feldman

JW Player Support Agent  
0 rated :

Are you using an actual iOS device or a simulator?

JW Player

User  
0 rated :

actual ipad and phone

JW Player

User  
0 rated :

have you tried switching the modes order and trying html5 first, then Flash?

Ethan Feldman

JW Player Support Agent  
0 rated :

What model device(s) and version(s) of iOS?

JW Player

User  
0 rated :

Ipad 2 ios6, Nexus 7 (no idea!), iphone ios6..

JW Player

User  
0 rated :

iphone 4s btw

Ethan Feldman

JW Player Support Agent  
0 rated :

Does your m3u8 stream work here? – http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/m3u8.html

JW Player

User  
0 rated :

Yes it does

Ethan Feldman

JW Player Support Agent  
0 rated :

Ok, on your page, I would recommend just making it a fully html page, like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test Page</title>
</head>
<body>
<script type='text/javascript' src='http://oxforddigital.tv/streaming/ios/jwplayer.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://oxforddigital.tv/streaming/ios/player.swf',
'file': 'livehttp?adbe-live-event=liveevent',
'image': '',
'bufferlength': '2',
'streamer': 'rtmp://ec2-54-247-46-119.eu-west-1.compute.amazonaws.com/livepkgr',
'controlbar': 'over',
'autostart': 'true',
'stretching': 'exactfit',
'width': '640',
'height': '360',
'modes': [
{type: 'flash', src: 'http://oxforddigital.tv/streaming/ios/player.swf'},
{
type: 'html5',
config: {
levels: [
{'file': 'http://davcbyhfrl34d.cloudfront.net/hls-live/livepkgr/_definst_/liveevent/livestream.m3u8',
'provider': 'video'}
]
}
}
]
});
</script>
</body>
</html>

JW Player

User  
0 rated :

Thanks, done this but its still "this text must be replaced" on my iphone

http://oxforddigital.tv/streaming/ios/ethan.html

Check it out...

Ethan Feldman

JW Player Support Agent  
0 rated :

Remove this line – ‘image’: ’’,

Maybe that is breaking it?

JW Player

User  
0 rated :

No, still broken with that line removed, sorry

Ethan Feldman

JW Player Support Agent  
0 rated :

Hm, can you email me? I have an example of this working on another page – ethan [at] longtailvideo [dot] com, thanks.

This question has received the maximum number of answers.