Page 1 of 1

can LC play RTSP or other options for livestreaming?

Posted: Sun Feb 14, 2021 6:57 pm
by Monox18
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

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

Posted: Thu Jun 24, 2021 3:58 am
by JereMiami
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.

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

Posted: Thu Jun 24, 2021 2:14 pm
by Monox18
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.

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

Posted: Thu Jun 24, 2021 3:24 pm
by JereMiami
Thanks so much- I think I am coming to that conclusion as well.