To get access to all the additional features of the professional membership for $10 a month click the button below.
The MediaPlayer Video Streaming with SurfaceView kotlin on android tutorial describes how to stream video from a remote Url using the MediaPlayer.
In this tutorial we will cover:
- Adding internet and wake lock permissions
- Creating a layout with SurfaceView, ProgressBar and Scrollable TextView
- Setting up a listener for when the SurfaceView is available
- Setting the Surface to the MediaPlayer
- Adding audio support
- Setting the rtsp url to the MediaPlayer
- Adding a listener for when the buffering is complete
- Saving the playback position
- Getting the video dimensions and setting them to the SurfaceView
- Supporting activity lifecycle states