Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions theoplayer/how-to-guides/web/theolive/basic-playback-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ Once you know what options you have available, you can set the stream to be a sp
player.videoTracks[0].targetQuality = qualities[indexOfDesiredQualityLayer];
```

## Tracking Streaming Protocols

In OptiView Live, an [`Endpoint`](https://optiview.dolby.com/docs/theoplayer/v11/api-reference/web/interfaces/Endpoint.html) can contain sources for multiple streaming protocols. For instance, it can be configured to load a WebRTC source for real time streaming but load a HLS source to allow seeking into a DVR window. Another use case is one where HESP is used as the primary streaming protocol, but the player could fall back to a HLS source if the platform doesn't support HESP playback.

To track switches between the possible streaming protocols, you can listen for the `currentsourcechange` event. The `currentSource` property in the payload shows which source is being used under the hood.

```javascript
player.addEventListener('currentsourcechange', console.log);
```

## More information

- [API references](pathname:///theoplayer/v11/api-reference/web/classes/Player.html)
Loading