TVSDK can detect changed playback information in master m3u8 manifests for live streaming and update the playback information while the stream is playing. TVSDK supports a dynamic set of bit rate profiles as the profiles appear or disappear from the master manifest, including non-overlapping profile bit rates between updates.
The following features are supported:
All of the following conditions must be met:
Here is some information and examples about how the TVSDK accommodates updated master manifests.
By default, this feature is turned off. If your application turns it on by setting an update frequency in minutes, the following steps occur after every update interval:
The TVSDK checks the master manifest’s last modified time and etag to determine whether the file has been updated.
If both the time and etag have changed, the file is deemed as modified.
The TVSDK parses and analyzes the new manifest and takes appropriate action based on the nature of the update.
If the current playing bit rate matches the bit rate of the modified manifest, the TVSDK switches to the new profile.
The new profile could be from a different server or the same server, at the same bit rate. In this case, the transition is smooth.
If the current playing bit rate is no longer present in the new manifest, the TVSDK tries to find a bit rate in the current profile that also exists in the new manifest.
If the update is successful, the TVSDK dispatches a MediaPlayerItemEvent.MASTER_UPDATED
event.
If the update is not successful, playback continues with the set-up from before this update.
The following bit rates are broadcasting live:
The 2100k stream has some issues, so it needs to be restarted. The master manifest is updated to contain only 500k and 900k. Shortly afterwards, the users watching this program at 2100k will experience a bit rate switch down to 900k. The users watching at 900k continue to watch at 900k. Later, the 2100k stream resumes, and it is added back in the master manifest. A while later, the users who are watching at 900k, and have the bandwidth, are switched to 2100k.
The following bit rates are broadcasting live:
All of these bit rates need to be restarted. There are two temporal streams set up for this, at 400k and 1500k. The users are switched to 400k, which is the lowest bit rate of the new configuration. Some of the users are switched to 1500k when their bandwidth is sufficient. Later, the three bit rates are back up and the master manifest is updated. Users automatically switch back to watch at 500k, which is the lowest bandwidth in the revised (original) manifest. A while later, users are switched to the highest bandwidth (900k or 1200k) that their network allows.
You can turn on this feature and check for related events.
NetworkConfiguration.masterUpdateInterval
property.MediaPlayerItemEvent.MASTER_UPDATED
event.