-
Notifications
You must be signed in to change notification settings - Fork 0
Schedule update
The Schedule should be updated as part of the XMDS Schedule call. So each time you call XMDS you might get a new Schedule to parse. Schedule generated time
can be used to distinguish different schedules from XMDS.
Once you have a cached schedule, you will obviously need to parse it to get the set of events that are valid at that time. This should be updated whenever there is a schedule change, or whenever the parsed events would change.
- in windows we do this on a 10 second timer
- in android we set an alarm after we've parsed the schedule which says when it should be parsed next according to the schedule it has - with a max limit of 5 minutes
If layouts and overlays are still somewhere in the schedule (by scheduleId and layoutId), then we leave them to play until the end. If they have gone from the schedule, we stop them and start fresh.
We continue playing from the sequence in the schedule we are currently showing (if the layout is in a new schedule) unless that is now past the end of the new schedule, in which case we start at the beginning. Imagine someone adds an extra layout to the schedule, it is basically the same now, but with 1 more item at the end... so we want to carry on using the current sequence.