Providers
Google Cast
This provider enables remote playback using the Google Cast framework.
This provider adds support for playing media on a remote device such as a TV using the Google Cast framework. This provider is automatically lazy loaded when a cast receiver is selected by the user. See the Remote Playback API for more information on how to request and track changes.
Configure
Section titled ConfigureThe googleCast
player property can be used to configure the receiver application ID like so:
You can further configure the cast context, session, media, and player in the provider setup hook like so:
Error Handling
Section titled Error HandlingYou can listen for and handle Google Cast prompt errors like so:
Active Screen
Section titled Active ScreenWhen Google Cast is active (i.e., connected to a receiver), a black screen is displayed inside
the MediaProvider
with the Google Cast logo and the name of the connected device.
Events
Section titled EventsAll Google Cast events can be listened to directly off the player component:
Event Types
Section titled Event TypesAll cast event types are prefixed with GoogleCast
and end with Event
like so: