GCKAVPlayerItemAudioTap Class

GCKAVPlayerItemAudioTap Class Reference

Overview

AVPlayerItem tap that redirects audio to a Remote Display session.

Using GCKAVPlayerItemAudioTap, the audio of an AVPlayerItem can be redirected to a Remote Display session. Together with GCKAVPlayerItemVideoTap, this allows to send media playing on the local device to a Remote Display receiver.

The tap works by setting the AVPlayerItem's audioMix property. If some other code changes the audioMix property afterwards, the tap will stop working.

Inherits NSObject.

Instance Method Summary

(instancetype) - initWithSession:
 Initialize a new AVPlayerItem audio tap bound to the specified session. More...
 
(void) - setPlayerItem:track:
 Set the audio tap's AVPlayerItem and AVAssetTrack. More...
 
(void) - reset
 Reset the audio tap. More...
 
(instancetype) - NS_UNAVAILABLE
 

Properties

id< GCKRemoteDisplaySessionsession
 Remote Display session the tap is bound to. More...
 
AVPlayerItem * playerItem
 The current AVPlayerItem. More...
 
AVAssetTrack * assetTrack
 The current AVAssetTrack. More...
 

Method Detail

- (instancetype) initWithSession: (id< GCKRemoteDisplaySession >)  session

Initialize a new AVPlayerItem audio tap bound to the specified session.

- (void) setPlayerItem: (AVPlayerItem *)  item
track: (AVAssetTrack *)  track 

Set the audio tap's AVPlayerItem and AVAssetTrack.

The track must be an audio track that belongs to the AVPlayerItem's current asset. After calling this method, the tap will start redirecting audio from the specified track to its Remote Display session until the tap is reset, deallocated or another player item and track is set.

- (void) reset

Reset the audio tap.

Frees all internal resources. The audio tap can be used again after calling this method by setting a new player item and track.

Property Documentation

- (id<GCKRemoteDisplaySession>) session
readnonatomicweak

Remote Display session the tap is bound to.

- (AVPlayerItem*) playerItem
readnonatomicassign

The current AVPlayerItem.

Use -setPlayerItem:track: to set this property.

- (AVAssetTrack*) assetTrack
readnonatomicassign

The current AVAssetTrack.

Use -setPlayerItem:track: to set this property.

Google Cast iOS Sender API Reference v 2.10.1 4691