Skip to content
FrameworkStyle

Remote Playback

Remote playback state and actions for the player store

Controls remote playback to devices like Chromecast. Exits fullscreen before initiating a remote playback session.

API Reference

State

Property Type Details
remotePlaybackState 'disconnected' | 'connecting' | 'connected'
remotePlaybackAvailability 'available' | 'unavailable' | 'unsupported'

Actions

Action Type Details
toggleRemotePlayback () => Promise<void>

Selector

Pass selectRemotePlayback to PlayerController to subscribe to remote playback state. Returns undefined if the remote playback feature is not configured.

import { createPlayer, MediaElement, selectRemotePlayback } from '@videojs/html';
import { videoFeatures } from '@videojs/html/video';

const { PlayerController, context } = createPlayer({ features: videoFeatures });

class CastButton extends MediaElement {
  readonly #remotePlayback = new PlayerController(this, context, selectRemotePlayback);
}