StreamConcurrencyService
public protocol StreamConcurrencyService
The Stream Concurrency Service contract
-
putStreamForDevice(deviceId:Default implementationcontentId: primaryId: catalogType: token: headers: completion: ) API to reserve a stream for playback. Returns error when the request fails. Whenever reserving a stream results in streams count reaching the allowed limit, the earlier allowed streams will be released automatically.
Default Implementation
API to reserve a stream for playback. Returns error when the request fails. Whenever reserving a stream results in streams count reaching the allowed limit, the earlier allowed streams will be released automatically.
Declaration
Swift
func putStreamForDevice(deviceId: String, contentId: String?, primaryId: String?, catalogType: String?, token: String?, headers: Headers?, completion: @escaping (Result<Void, Error>) -> Void)Parameters
deviceIdThe unique identifier of the device.
contentIdThe content id for which the heartbeat is to be triggered
primaryIdThe unique identifier of the primary content to which the selected content (i.e. secondary angle content) to play is associated with. This is applicable only for multi-camera enabled content.
catalogTypeThe value of the Catalog Type of content
tokenThe heartbeat token to be sent.
headersHeaders if any to be sent with request
completionThe handle to invoke on request completion
-
deleteStreamForDevice(deviceId:Default implementationheaders: completion: ) API to delete a stream for the given device Id. Returns error when the request fails.
Default Implementation
API to delete a stream for the given device Id. Returns error when the request fails.
Declaration
Swift
func deleteStreamForDevice(deviceId: String, headers: Headers?, completion: @escaping (Result<Void, Error>) -> Void)