React Native Google Cast

React Native Google Cast

  • Docs
  • GitHub

›Guides

Getting Started

  • Installation
  • Setup
  • Usage
  • Troubleshooting

Guides

  • Custom Channels
  • Customize UI
  • Events
  • Hooks
  • Media Tracks
  • Queueing
  • Volume

Components

  • CastButton
  • ExpandedController

API

  • CastChannel
  • CastContext
  • CastSession
  • DiscoveryManager
  • RemoteMediaClient
  • SessionManager

Types

  • ApplicationMetadata
  • Device
  • MediaInfo
  • MediaLiveSeekableRange
  • MediaLoadRequest
  • MediaMetadata
    • Generic
    • Movie
    • MusicTrack
    • Photo
    • TvShow
    • User
  • MediaQueueContainerMetadata
  • MediaQueueData
  • MediaQueueItem
  • MediaSeekOptions
  • MediaStatus
  • MediaTrack
  • TextTrackStyle
  • UseCastSessionOptions
  • VideoInfo
  • WebImage

Enums

  • ActiveInputState
  • CastState
  • MediaHlsSegmentFormat
  • MediaHlsVideoSegmentFormat
  • MediaPlayerIdleReason
  • MediaPlayerState
  • MediaQueueContainerType
  • MediaQueueType
  • MediaRepeatMode
  • MediaStreamType
  • PlayServicesState
  • StandbyState

Volume

The Cast framework automatically manages the volume for the sender app and synchronizes the sender and receiver apps so that the sender UI always reports the volume specified by the receiver.

On Android, physical button volume control is enabled automatically.

On iOS, you need to enable it when initializing the cast context in AppDelegate:

Objective-C
Swift
// insert this line
options.physicalVolumeButtonsWillControlDeviceVolume = true;
// before
[GCKCastContext setSharedInstanceWithOptions:options];
// insert this line
options.physicalVolumeButtonsWillControlDeviceVolume = true
// before
GCKCastContext.setSharedInstanceWith(options)

You can also change the volume using client.setStreamVolume.

Last updated on 1/2/2021 by Petr Bela
← QueueingCastButton →