Live Video Streaming
If you find any problems or bugs when you are using the tutorials, please submit a issue in the github to inform us. We are glad to receive any pull request from the Github, and help you to repair those issues. Please refer Yuneec-RTSP-Player-Android for this tutorial.
Yuneec-RTSP-Player-Android library provides the required APIs to easily display the live video stream on any Android device. Make sure to connect your phone to the camera wifi to be able to view the video. Goto phone settings and tap on Wifi and choose the appropriate network name(SSID).
Below is the sequence of methods to be called from the library to successfully display the video stream
- Define the player.
RTSPPLayer videoPlayer = (RTSPPlayer) VideoPlayer.getPlayer(VideoPlayer.PlayerType.LIVE_STREAM);
- Initialize the player.
- Specify the URL from where the stream is received.
- Set the surface where the stream needs to be displayed. Make sure to set the surface when you get the surfaceCreated callback for the SurfaceHolder. Please refer SurfaceHolder Callback.
- Start the player.
- Release the player when the app is closed.