Lesson 5: m3u8 playlists in the mobile video player

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
juanjo
Posts: 35
Joined: Wed Jul 31, 2013 10:31 am

Lesson 5: m3u8 playlists in the mobile video player

Post by juanjo » Tue Sep 03, 2013 7:04 pm

I'm making a video player app for iOS and Android, for a television station, and the streaming provider does not offer me URLs to individual videos, but playlists in m3u8 format.

In an early test, for a moment, it began to play a video (on the iPad), so it seems possible, but since that time has not worked again.

Does exists some documentation about it, or can you guide me on formats and other options (multibitrate…) of the m3u8 in the mobile player?

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by LCNeil » Wed Sep 04, 2013 9:15 am

Hi Juanjo,

The following links provide some informations on the various formats supported by both native players on Android and iOS-

https://developer.apple.com/library/ios ... Layer.html

http://developer.android.com/guide/appe ... rmats.html

Although I have had no direct experience with implementing m3u8 playlists I tried the following example playlist and it played back on an iOS native player without any issues-

http://qthttp.apple.com.edgesuite.net/1 ... fg/sl.m3u8

Would you be able to supply the m3u8 playlist you will be using? This would allow me to conduct some further tests and then possibly advise further.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--

Camster
Posts: 7
Joined: Tue Aug 06, 2013 6:51 pm
Location: New York, USA

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by Camster » Wed Sep 04, 2013 8:12 pm

Hi Juanjo,

I second that the m3u8 files play back on the IOS native player without problems.
Try this:
Create a simple stack for iPhone - landscape with the following code, save it and run in the sim...it should work.

Code: Select all

on opencard
   mobileControlCreate "player", "HLSplayer"  --create a player HLSplayer
   mobileControlSet "HLSplayer", "visible", true
   mobileControlSet "HLSplayer", "rect", "5,5,460,280" --adjust these settings to suit your screen real-estate
   mobileControlSet "HLSplayer", "fileName", "url of your m3u8 files here"  --stream the HLS files
end opencard 
Hope this helps.
Camster

juanjo
Posts: 35
Joined: Wed Jul 31, 2013 10:31 am

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by juanjo » Wed Sep 04, 2013 9:16 pm

Thank you both!

I'll try it in the next days.

And what about Android?

Camster
Posts: 7
Joined: Tue Aug 06, 2013 6:51 pm
Location: New York, USA

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by Camster » Tue Sep 10, 2013 2:56 am

Could not get this to work on Android. sorry, (on the Android emulator that is)

as a matter of fact I cannot play any video on Android and that includes simply browsing a vid in youtube! No time to troubleshoot in the next days...
Neil, any insight?

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by LCNeil » Mon Sep 16, 2013 10:40 am

Hi Camster,

Apologises for the delayed respose

Video playback is severely hindered on the Android emulator. This is an emulator issue and does not relate to LiveCode. Playback of video on an Android emulator is very dependent on having a powerful development machine.

If possible, I would recommend deploying your stack to a physical device as this should allow the playback of video without any issue.

The following are some stack overflow post from other Android developers who experienced similar video playback issues on the Android emulator-

http://stackoverflow.com/questions/2544 ... ov-3gp-etc

http://stackoverflow.com/questions/1425 ... remote-url

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--

rayanah
Posts: 1
Joined: Fri Sep 20, 2013 12:14 pm

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by rayanah » Fri Sep 20, 2013 12:25 pm

i have already same problem , Android Could not get this to work.

Camster
Posts: 7
Joined: Tue Aug 06, 2013 6:51 pm
Location: New York, USA

Re: Lesson 5: m3u8 playlists in the mobile video player

Post by Camster » Fri Sep 20, 2013 7:04 pm

Rayanah,

You mean you could not get the videos to work on the Android emulator right? or on your actual Android device?
LC confirmed that videos actually DO NOT work on the Android emu. see Neil's post above...

Regards,

Camster.

Post Reply

Return to “Summer School 2013”