can LC play RTSP or other options for livestreaming?

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Monox18
Posts: 118
Joined: Tue Nov 25, 2014 9:48 pm
Location: Deggendorf, Germany

can LC play RTSP or other options for livestreaming?

Post by Monox18 » Sun Feb 14, 2021 6:57 pm

Hello all,

Any ideas how to play Real Time Streaming Protocol (RTSP) in Android's native player? I have a URL "rtsp://xxx.yyy.zzz" for an IP camera. I have tested the RTSP stream over the internet with both a VLC player on windows and a Android App named IP Cam Viewer and another named RTSP Player. I can successfully check that my IP camera is correctly streaming over the Internet for both devices but I fail to display it in LiveCode. It seems RTSP does work in LiveCode for Mac in the native player object from reading other posts. I'm trying this code:

Code: Select all

...
mobileControlCreate "player", "myPlayer" 
mobileControlSet "myPlayer", "filename", "rtsp://xxx.yyy.zzz" 
mobileControlDo "myPlayer", "play"
...
But there is no stream. I even disabled the user/password check to simplify it. As for the standalone properties, I enabled Internet permission and Hardware Acceleration. I'm deploying to a real Android device. Any ideas?

Thanks
Monox
Developing a Cyber Physical System.
https://www.monoxware.com/

JereMiami
Posts: 119
Joined: Mon Nov 03, 2014 12:17 am

Re: can LC play RTSP or other options for livestreaming?

Post by JereMiami » Thu Jun 24, 2021 3:58 am

Any luck on this? I was able to have it stream through the browser widget on the laptop, but not on mobile through mobileControlCreate.

Code: Select all

   
   if the environment is mobile then
      mobileControlCreate "player", "livestream"
      mobileControlSet "livestream", "visible", true
      mobileControlSet "livestream", "rect", the rect of grc "player"
      mobileControlSet "livestream", "filename", "https://stream.app.com/stream_id"
      mobileControlDo "livestream", "play"
   end if
   
I got two black lines, one on top and one on bottom with nothing in between. Curious if you got this to work.

Monox18
Posts: 118
Joined: Tue Nov 25, 2014 9:48 pm
Location: Deggendorf, Germany

Re: can LC play RTSP or other options for livestreaming?

Post by Monox18 » Thu Jun 24, 2021 2:14 pm

mobileControlCreate player doesn't work with livestreams, although I didn't do many tests, I quickly discarded it and proceeded with the browser widget. The browser widget does work in both mobile and laptop and can play livestreams. You will have to play around with some HTML/CSS/JS to make it look like a native object in your app as well as exchanging data between LC and the browser.
Monox
Developing a Cyber Physical System.
https://www.monoxware.com/

JereMiami
Posts: 119
Joined: Mon Nov 03, 2014 12:17 am

Re: can LC play RTSP or other options for livestreaming?

Post by JereMiami » Thu Jun 24, 2021 3:24 pm

Thanks so much- I think I am coming to that conclusion as well.

Post Reply

Return to “Android Deployment”