-
Notifications
You must be signed in to change notification settings - Fork 19
Program Requirements
## Program requirements from the cloud.
The Actions in a program vary from episode to episode. An episode of a program can have a mix of the four possible actions which are:
- Local Media play off the phone
- Playing the Jingle for the program
- Accepting incoming calls
- Streaming from a defined source
- Playing padding music to fill in some spaces.
Here are the definitions of the different actions:
-
The JSON for the scheduled program will include the definition of the Jingle as follows:
-
Jingle: { "url_file": "http://demo.rootio.org/api/station/jingles/12?api_key=&123123123", “start_time”: “00:00:00”, “duration”: “00:01:00” }
-
Media: { “start_time”: “00:00:00”, “duration”: “00:10:00” }
-
Stream { "stream_url": "http://10.10.2.3:5000/rootio", “start_time”: “00:00:00”, “duration”: “00:10:00” }
-
Music { “tag”:”RnB”, “start_time”: “00:15:00”, “duration”: “00:05:00” }
Generally, phone calls will displace whatever is running and at the end the scheduler will try and find out where it should be in the scheduled stuff.
I suggest that, rather than start time and duration, we think about “start condition”:{“condition”:”time”,”parameters”:{“start_time”:”00:15:00”, “duration”:”00:05:00”}} This way the condition for starting media could potentially be different, like an ssh signal or hangup or such.
- The phone passes to the cloud the base id of the media that it last received
- The cloud gets the JSON description for episodes for that station beyond that ID
- The cloud returns Media descriptions with a program id, ordered by airing date
- The phone then matches the episode names returned to schedules of the program specified in the JSON.
- Media files are added onto the download backlog for download by the system.