RTP Client Application on Android Android Device

Hi guys, I am developing an RTP client on an Android device that can play streaming video from a server. I am confused as to how to start? I am thinking of developing a web application using HTML, CSS and Javascript, which can later be wrapped in Android. Is this approach right? Does javascript support real-time media player? please guide me, I am more fresh and completely ignorant ..: (

+4
source share
3 answers

You must play your video using MediaPlayer. Of course, you can prepare a dedicated website that lists the available streams and completed in WebView. Having this list of streams in a WebView, you can write an interface that links javascript on your web page with the correct interface in your Android code. Check out this section of the Android Dev manual:

And here is a list of supported media formats

I played rtsp stream successfully on Android 2.2, but I'm not sure if it was supported in previous versions.

Summarizing.

  • Prepare a site with javascript code and a list of threads

  • Create a layout with a webview with javascript support, for example:

    Webview wv = (WebView) findViewById(R.id.WebView01); wv.setJavaScriptEnabled(true); 
  • Add a class that will be called by javascript, as in the Dev manual above:

     wv.addJavascriptInterface(new JavaScriptInterface(this), "Android");` 
  • Play Stream Using MediaPlayer

Hope this helps.

+1
source

I assume that you can set up a streaming media server (live555, darwin stream server) to publish a media file in rtsp protocol and use VideoView on Android to play it

0
source

If you create a normal Android application, the MediaPlayer class will handle everything for you. Just give it the url of the rtp stream, i.e. it.

0
source

Source: https://habr.com/ru/post/1307409/


All Articles