Because of the convenience of the REST API we are trying to develop our new features using it. There is one action in particular which could be done using the JAVA API but I have not found similar one in REST.
It was possible to send the ServerListenerStreamPublisher object a loadSchedule(IApplicationInstance object) method which would tell the application to load the SMIL file defined in the Application settings.
Does the REST call “PUT /v2/servers/{serverName}/vhosts/{vhostName}/applications/{appName}/smilfiles/{smilfileName}/actions/connect” perform a similar function?
This REST API call is for an SMIL that is used with Multiple Bit Rate renditions, and the smil file for scheduled streams currently is not exposed to the REST API.
You will need to continue to utilize the JAVA API for this functionality.
Can someone point me at the JAVA API method to do this, please?
Additionally, is there a roadmap for having this added to the REST API?
The reasons for it being there are strong:
A live stream gets dumped from memory as soon as the encoder is stopped.
Therefore, any clients will lose the connection immediately, and latency will mean that they will not see the conclusion of the stream.
The workaround for this is to use Loop until Live.
However, the scheduler smil file cannot be connected through REST and as pretty much all of our webinars will need to use Loop until Live, this is a vital, missing piece of the puzzle.
You need to create an HTTP Provider so that you can interact using HTTP requests, like the REST API.
Add ServerListenerStreamPublisher class to your Sever Listeners & import it into your HTTP provider to implement public method loadSchedule and other useful methods which will force your application to handle SMIL scheduling.
I have discovered (advised by @Michelle Brinker) that the REST API will actually connect the StreamSchedule SMIL file.
Using this cUrl command, substituting %appName% for your Application name:
curl -X PUT --header 'Accept:application/json; charset=utf-8' --header 'Content-Type:application/json; charset=utf-8' "http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/%appName%/smilfiles/lulstream/actions/connect?connectAppName=%%appName&appInstance=_definst_&mediaCasterType=rtp"
The problem was that another REST call (to put advanced/custom properties into my application xml) was (and still is, as I believe it to be buggy) putting the properties into the wrong node (basically, the first one it encounters, regardless of the path given in the command), and also actually removes the contents of the Application/Modules node.
I hope this helps anyone else who may be struggling.