# Video Stream Authentication

### Overview of video authentication flow

![](https://1325573919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuRglNIIF92AmJgTDDRZo%2Fuploads%2Fgit-blob-bea1c65bf8edd1236fb13eebbe845f6e82e88269%2FScreenshot%202020-06-30%20at%2000.53.49.png?alt=media)

An operator can set parameters when initialising the event centre to enable or disable video in the UI. The message displayed to users can be configured in advance.

```
frontRowSeat.eventCentre({
  ..
  options: {
    videoPlaybackEnabled: true/false
  }
)
```

it would also be possible to update this value at runtime

```
.emit(OptionsUpdate: {
  videoPlaybackEnabled: true/false
})
```

When a user presses play the event-centre will emit a message requesting the operator to authenticate the video playback.

```
.on(VideoPlaybackAuthRequest, {
  messageType: 'VideoPlaybackAuthRequest'
})
```

The operator should respond with the auth token using the existing guidelines described in IMG ALC Streaming documentation. It is important that the operatorId, and timestamp match those used to create the token.

```
.emit(VideoPlaybackAuthResponse, {
  messageType: 'VideoPlaybackAuthResponse',
  operatorId: '<OPERATOR-ALC-ID>'.
  auth: '<OPERATOR-ALC-TOKEN>',
  timestamp: 1576339325918
})
```
