360 Degree Camera Mode
Content Authorization
A PlatformAsset for the 360 Degree camera supported content should be constructed with playbackMode = "LIVE360".
| Name | Type | Description |
|---|---|---|
| playbackMode | PlaybackMode | Playback mode of the content |
| |
// create asset
let platformAsset: PlatformAsset{
...,
playbackMode : "LIVE360"
}
Playback Auth Response
We can get live360Enabled, live360StartTime, live360EndTime and live360ContentId in playback auth response.
| Name | Type | Description |
|---|---|---|
| live360StartTime | String | The start time of the live 360 camera supported content |
| live360EndTime | String | The end time of the live 360 camera supported content |
| live360Enabled | Boolean | The boolean to indicate whether live 360 camera is enabled or not |
| live360ContentId | String | The content identifier of the live 360 camera supported content |
let contentAuthToken = await contentAuthorizer.authorizePlayback(platformAsset);
Setup Heartbeat
To extend support for 360 Degree camera feature, PlayerConfig will now accept couple of additional params.
| Name | Type | Description |
|---|---|---|
| live360StartTime | String | The start time of the live 360 camera supported content |
| live360EndTime | String | The end time of the live 360 camera supported content |
| |
let heartbeatConfiguration: HeartbeatConfig = {
...
live360StartTime: contentAuthToken.live360StartTime,
live360EndTime: contentAuthToken.live360EndTime
}
val playerConfig: PlayerConfig = {
...
heartbeatConfig: heartbeatConfiguration,
}
Listen for stream events
We can get live360Available and live360Unavailable events through streamTimelineEvent of onEventReceived callback in playerListener.
onEventReceived(streamTimelineEvent: StreamTimelineEvent, action: Action, streamTimelineMetadata?: StreamTimelineMetadata) {
switch (streamTimelineEvent) {
case "live360Available":
// Show the 360 button
break;
case "live360Unavailable":
// Hide the 360 button
break;
}
},