GCKUIStreamPositionController Class

GCKUIStreamPositionController Class Reference

Overview

A class that can be used to implement a custom stream position and/or seek UI, in situations where ordinary UISlider, UIProgressView, and UILabel controls will not suffice.

The application may either subclass this class and override the GCKUIStreamPositionController::streamPosition, GCKUIStreamPositionController::streamDuration, and GCKUIStreamPositionController::inputEnabled setters, or use KVO to listen for changes to these properties, and update its stream position and/or seek UI control(s) accordingly.

Since
3.4

Inherits NSObject.

Instance Method Summary

(instancetype) - init
 Designated initializer. More...
 

Property Summary

NSTimeInterval streamPosition
 The current stream position from the GCKRemoteMediaClient. More...
 
NSTimeInterval streamDuration
 The current stream duration from the GCKRemoteMediaClient. More...
 
BOOL inputEnabled
 The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this controller. More...
 

Method Detail

- (instancetype) init

Designated initializer.

Property Detail

- (NSTimeInterval) streamPosition
readwritenonatomicassign

The current stream position from the GCKRemoteMediaClient.

The GCKUIMediaController writes this property whenever the stream position changes; while the stream is advancing, the property will be updated once per second. The GCKUIMediaController observes the property (unless it is in the process of writing it) and if it changes, it issues the appropriate media command with the GCKRemoteMediaPlayer to seek to the new stream position. Note that updating this value on an unseekable stream will have no effect.

- (NSTimeInterval) streamDuration
readwritenonatomicassign

The current stream duration from the GCKRemoteMediaClient.

The GCKUIMediaController writes this property whenever the stream duration changes. If the stream does not have a known duration (because it is a live stream, for example), then the value written will be kGCKInvalidTimeInterval. It is not meaningful for the application to change this value.

- (BOOL) inputEnabled
readwritenonatomicassign

The GCKUIMediaController writes this property to enable or disable the UI control(s) managed by this controller.

Media-related UI controls are temporarily disabled while a media command is in-flight.