StreamingSession
@interface StreamingSession : AbstractSession
Once a session has been created, all next calls have to be done on that object. The “getURL” way will also use the StreamingSession API internally with the actual “one session at a time” limitation (i.e only 1 StreamingSession object stored).
-
getURL (session start, default method)
Create a session on the Broadpeak CDN, create a session on the nanoCDN, identify if a non-Broadpeak CDN is used
Workflow: getURL() -> session is running -> stopStreamingSession()
Note: To be called to start any viewing session
Declaration
Objective-C
- (nonnull StreamingSessionResult *)getURL:(nonnull NSString *)requestedURL;Parameters
requestedURLRequested URL (i.e http://hostname/manifest)
Return Value
result
-
getQuery (session start, proxy mode, first call)
Call this method just before creating your session, append the result to your requested URL
Workflow: getQuery() -> handle session creation by your side -> startStreamingSession(…) -> session is running -> stopStreamingSession()
Note: Not compatible in case of nanoCDN workflow, works with startStreamingSession
Declaration
Objective-C
- (nonnull NSString *)getQuery;Return Value
Query parameters to pass to the Broadpeak CDN through your proxy (i.e “bk-ml=1&smartlib-parameter=dev”)
-
startStreamingSession (session start, proxy mode, second call)
Workflow: getQuery() -> handle session creation by your side -> startStreamingSession(…) -> session is running -> stopStreamingSession()
Note: Only works if getQuery() has been called
Declaration
Objective-C
- (void)startStreamingSession:(nonnull NSString *)requestedURL redirectedURL:(nonnull NSString *)redirectedURL;Parameters
requestedURLRequested URL, url called by your side
redirectedURLStream URL, url retrieved by the proxy
-
Call this method after each session.
Note: If the session ended on error, please use stopStreamingSession(statusCode)
Declaration
Objective-C
- (id)stopStreamingSession;Return Value
Session report
-
Call this method after each session.
Declaration
Objective-C
- (id)stopStreamingSession:(int)statusCode;Parameters
statusCodeOptional parameter to specify session status code (i.e SmartLib.BPNetworkingError)
Return Value
Session report
-
Is the session started on a nanoCDN
Declaration
Objective-C
- (BOOL)isNanoCDNUsed;Return Value
true if a nanoCDN is used
-
Get the video multicast status Value based on a nanoCDN info and will be updated every 5 seconds Note that it is always false when not using a nanoCDN
Declaration
Objective-C
- (int)getVideoMulticastStatus;Return Value
multicast status (defined in StreamingSessionOptions)
-
Get the audio multicast status Value based on a nanoCDN info and will be updated every 5 seconds Note that it is always false when not using a nanoCDN
Declaration
Objective-C
- (int)getAudioMulticastStatus;Return Value
multicast status (defined in StreamingSessionOptions)
-
Get the data multicast status Value based on a nanoCDN info and will be updated every 5 seconds Note that it is always false when not using a nanoCDN
Declaration
Objective-C
- (int)getDataMulticastStatus;Return Value
multicast status (defined in StreamingSessionOptions)
Install in Dash
StreamingSession Class Reference