pub struct Session {
pub content_id: Option<String>,
pub playback_rate: Option<f64>,
pub streaming_format: Option<StreamingFormat>,
pub session_id: Option<String>,
pub stream_type: Option<StreamType>,
pub version: Option<i64>,
}Expand description
An CMCD-Session Header contains
keys whose values are expected to be invariant over the
life of the session.
Fields§
§content_id: Option<String>Key: cid
Header: CMCD-Session
Type & Unit: String
A unique string identifying the current content. Maximum length is 64 characters. This value is consistent across multiple different sessions and devices and is defined and updated at the discretion of the service provider.
playback_rate: Option<f64>Key: pr
Header: CMCD-Session
Type & Unit: Decimal
1 if real-time, 2 if double speed, 0 if not playing. SHOULD only be sent if not equal to 1
streaming_format: Option<StreamingFormat>Key: sf
Header: CMCD-Session
Type & Unit: Token
The streaming format that defines the current request.
d = MPEG DASH
h = HTTP Live Streaming (HLS)
s = Smooth Streaming
o = other
If the streaming format being requested is unknown, then this key MUST NOT be used.
session_id: Option<String>Key: sid
Header: CMCD-Session
Type & Unit: String
A GUID identifying the current playback session. A playback session typically ties together segments belonging to a single media asset. Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID specification RFC4122.
stream_type: Option<StreamType>Key: st
Header: CMCD-Session
Type & Unit: Token
v = all segments are available – e.g., VOD
l = segments become available over time – e.g., LIVE
version: Option<i64>Key: v
Header: CMCD-Session
Type & Unit: Integer
The version of this specification used for interpreting the defined key names and values. If this key is omitted, the client and server MUST interpret the values as being defined by version 1. Client SHOULD omit this field if the version is 1.