Jump to content
  • 0

Is there a way to construct and manipulate a playlist using the Java API?


Balazs
 Share

Question

I'd like to construct a pseudo-live stream based on local mp4 files organized into playlists. I'd like to keep track of the item being played and optionally do simple things, like jumping to the next item, manipulating the playlist (while on air), etc. Is there a Java API support for such things?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Balazs
I hope you are doing well.
1. We have implemented the solution to skip to the next file using Rest API. The PR is raised but it is not merged yet.
https://github.com/ant-media/Ant-Media-Server/issues/4106

2. You can also update the broadcast/playlist details using the update broadcast API. Here is the Curl sample:

curl --location --request PUT 'https://your-domain:5443/LiveApp/rest/v2/broadcasts/streamId' \

--header 'Content-Type: application/json' \
--data-raw '{"playListItemList": [
        {
            "streamUrl""http://your-mp4-file-URL.mp4",
            "type""VoD"
        },
        {
            "streamUrl""http://your-2nd-mp4-file-URL.mp4",
            "type""VoD"
        }
        
    ]}'

I hope it helps.
Link to comment
Share on other sites

  • 0

Yes, this would allow me to implement a playout system. Looking at the PR mentioned by @Yash there seem to be an internal way to achieve this, question is if this API is considered public facing or we can expect breaking changes..?

https://github.com/ant-media/Ant-Media-Server/blob/master/src/main/java/io/antmedia/datastore/db/types/Broadcast.java

I wonder if introducing JPMS (jigsaw) would help you to define module boundaries and make it clear for developers which classes are ok to rely on and which ones are internal. The traditional visibility modifiers of Java cannot express this granularity.

Link to comment
Share on other sites

  • 0

Actually, I want to discuss the design with you and other plugin/app creators to understand what make your work easier. Personally I think AMS should have more interaction points with plugins/apps. We are open to discuss and learn correct way.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...