Skip to content

Manually create schedule

To create a schedule, first create a channel where the schedule can run. Use the /channels API to create the channel, for example using curl:

curl -X POST "http://{SCHEDULE_HOST}:8001/channels" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"id\":\"test\",\"config\":{\"auto_populate\": false}}"

Manually create a schedule

Then, to manually create a schedule to stream on the channel, POST to the endpoint /channels/test/schedule where test is the id of your channel. The start_time will be the time you want your schedule to run, in unix timestamp format * 1000 for milliseconds. The end_time will be the time the schedule stops, and will be the start_time plus the duration of the video. So for example, if the duration is 106 seconds, times 1000 for milliseconds, the end_time will be the start_time plus 106000. Using curl:

curl -X POST "http://{SCHEDULE_HOST}:8001/channels/test/schedule" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"title\":\"Test asset\",
\"id\":\"5\",
\"start_time\":\"1587990370000\",
\"end_time\":\"1587990476000\",
\"uri\":\"https://maitv-vod.lab.eyevinn.technology/tearsofsteel_4k.mov/master.m3u8\",
\"duration\":\"106\",
}"

Verify that the schedule has been created:

curl -X GET "http://{SCHEDULE_HOST}:8001/channels/5/schedule" -H "accept: application/json"

Watch the channel

Verify that the channel is playing with an HLS capable video player or test in the Safari browser. You can also find an example player to use at our Eyevinn Player.

Copy the link and paste it in our sample player to play the channel test you created.

http://{ENGINE_HOST}:8000/live/master.m3u8?channel=test

Continue Reading

  • Channel Manager : covers how to work with the Channel Manager API to create channels and schedule events.