VoD Streaming via WebRTC/HLS
  • 25 Jun 2022
  • 1 Minute to read
  • Dark
    Light

VoD Streaming via WebRTC/HLS

  • Dark
    Light

You can play VoDs as WebRTC and HLS in Ant Media Server.

Let's show you how to do it.

1. To do this, first log in to Dashboard, select your Application, and click New Live Stream > Playlist.

 2. After naming the Playlist, add the URL address of mp4 files you want to add under the Playlist URL and click Create.

3. After your playlist is created, click "Start Broadcast" to start the broadcast.

How to create Playlist using Rest API?

You just need to put playlist name and URLs in playlistItemList while creating broadcast.

Here is the sample create Playlist CURL command:

curl -X POST -H "Content-Type: application/json" "https://{domain:port}/{application}/rest/v2/broadcasts/create" -d '{ "name":"streamName", "playListItemList":[ { "streamUrl": "http://SAMPLE_STREAM_URL.com/sample.mp4", "type": "VoD" } ], "type":"playlist" }'

How to play playlist with WebRTC?

https://ams_url:5443/your_app/play.html?name=your_stream_id

http://192.168.1.231:5080/WebRTCAppEE/play.html?name=409725676703036651955360

How to play playlist with HLS?

https://ams_url:5443/your_app/play.html?name=your_stream_id&playOrder=hls

http://192.168.1.231:5080/WebRTCAppEE/play.html?name=409725676703036651955360&playOrder=hls



Was this article helpful?