Page 1 of 1

playing .m3u8

Posted: Thu Mar 16, 2017 4:33 am
by joseggarza
Hi all,

I need to make player for a .m3u8(HLS) on android.

I have the following code without any success

mobileControlCreate "player", "HLSplayer" --create a player HLSplayer
mobileControlSet "HLSplayer", "visible", true
mobileControlSet "HLSplayer", "rect", the rect of fld"field" --adjust these settings to suit your screen real-estate
mobileControlSet "HLSplayer", "URL", "http://qthttp.apple.com.edgesuite.net/1 ... fg/sl.m3u8" --stream the HLS files
mobileControlSet "HLSplayer","showController", true
mobileControlDo "HLSplayer", "play"

under Application Standalone settings I have Hardware accelerated and Internet checked.

I bought livecode business thinking it was a super dupper software, please advice if I need to develop this player on android studio.

Thanks

JG

Re: playing .m3u8

Posted: Thu Mar 16, 2017 11:59 am
by elanorb
Hi Jose

You just have a small error in your code, you should be setting the filename property of the player rather that the URL property.

I tested it here and it seems to work.

I hope that helps.

Kind regards

Elanor

Re: playing .m3u8

Posted: Fri Mar 17, 2017 3:31 am
by capellan
Like this example in the forums?
http://forums.livecode.com/viewtopic.ph ... 963#p85406

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