Inherits from MSFKFlintChannel : NSObject
Declared in MSFKMediaControlChannel.h
MSFKMediaControlChannel.m

Overview

A FlintChannel for media control operations.

@ingroup MediaControl

Properties

mediaStatus

The current media status, if any.

@property (nonatomic, strong) MSFKMediaStatus *mediaStatus

Discussion

The current media status, if any.

Declared In

MSFKMediaControlChannel.h

Instance Methods

approximateStreamPosition

Returns the approximate stream position as calculated from the last received stream information and the elapsed wall-time since that update.

- (NSTimeInterval)approximateStreamPosition

Discussion

Returns the approximate stream position as calculated from the last received stream information and the elapsed wall-time since that update.

Declared In

MSFKMediaControlChannel.h

didConnect

Called when this channel is added to a connected handler, or when then disconnected handler to which this channel has been added becomes connected.

- (void)didConnect

Discussion

Called when this channel is added to a connected handler, or when then disconnected handler to which this channel has been added becomes connected.

This implementation updates isConnected, so if subclasses override this method they should call through to the super implementation.

Declared In

MSFKFlintChannel.h

didDisconnect

Called when this channel is removed from a connected handler, or when then connected handler to which this channel has been added becomes disconnected.

- (void)didDisconnect

Discussion

Called when this channel is removed from a connected handler, or when then connected handler to which this channel has been added becomes disconnected.

This implementation updates isConnected, so if subclasses override this method they should call through to the super implementation.

Declared In

MSFKFlintChannel.h

didReceiveTextMessage:

Called when a text message has been received for this channel. The default implementation is a no-op.

- (void)didReceiveTextMessage:(NSString *)message

Parameters

message

The message string.

Discussion

Called when a text message has been received for this channel. The default implementation is a no-op.

Declared In

MSFKFlintChannel.h

init

Designated initializer.

- (id)init

Discussion

Designated initializer.

Declared In

MSFKMediaControlChannel.h

loadMedia:

Loads, enqueues (at the end of the queue), and starts playback of a new media item.

- (NSInteger)loadMedia:(MSFKMediaInformation *)mediaInfo

Parameters

mediaInfo

An object describing the media item to load.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Loads, enqueues (at the end of the queue), and starts playback of a new media item.

Declared In

MSFKMediaControlChannel.h

loadMedia:autoplay:

Loads, enqueues (at the end of the queue), and optionally starts playback of a new media item.

- (NSInteger)loadMedia:(MSFKMediaInformation *)mediaInfo autoplay:(BOOL)autoplay

Parameters

mediaInfo

An object describing the media item to load.

autoplay

Whether playback should start immediately.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Loads, enqueues (at the end of the queue), and optionally starts playback of a new media item.

Declared In

MSFKMediaControlChannel.h

loadMedia:autoplay:playPosition:

Loads, enqueues, and optionally starts playback of a new media item.

- (NSInteger)loadMedia:(MSFKMediaInformation *)mediaInfo autoplay:(BOOL)autoplay playPosition:(NSTimeInterval)playPosition

Parameters

mediaInfo

An object describing the media item to load.

autoplay

Whether playback should start immediately.

playPosition

The initial playback position.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Loads, enqueues, and optionally starts playback of a new media item.

Declared In

MSFKMediaControlChannel.h

loadMedia:autoplay:playPosition:customData:

Loads, enqueues, and optionally starts playback of a new media item.

- (NSInteger)loadMedia:(MSFKMediaInformation *)mediaInfo autoplay:(BOOL)autoplay playPosition:(NSTimeInterval)playPosition customData:(id)customData

Parameters

mediaInfo

An object describing the media item to load.

autoplay

Whether playback should start immediately.

playPosition

The initial playback position.

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Loads, enqueues, and optionally starts playback of a new media item.

Declared In

MSFKMediaControlChannel.h

pause

Pauses playback of the current media item.

- (NSInteger)pause

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Pauses playback of the current media item.

Declared In

MSFKMediaControlChannel.h

pauseWithCustomData:

Pauses playback of the current media item.

- (NSInteger)pauseWithCustomData:(id)customData

Parameters

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Pauses playback of the current media item.

Declared In

MSFKMediaControlChannel.h

play

Begins (or resumes) playback of the current media item. Playback always begins at the beginning of the stream. Asserts if there is no current media session.

- (NSInteger)play

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Begins (or resumes) playback of the current media item. Playback always begins at the beginning of the stream. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

playWithCustomData:

Begins (or resumes) playback of the current media item. Playback always begins at the beginning of the stream. Asserts if there is no current media session.

- (NSInteger)playWithCustomData:(id)customData

Parameters

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Begins (or resumes) playback of the current media item. Playback always begins at the beginning of the stream. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

requestStatus

Requests updated media status information from the receiver. Asserts if there is no current media session.

- (NSInteger)requestStatus

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Requests updated media status information from the receiver. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

seekToTimeInterval:

Seeks to a new time within the current media item.

- (NSInteger)seekToTimeInterval:(NSTimeInterval)timeInterval

Parameters

position

The new time interval from the beginning of the stream.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Seeks to a new time within the current media item.

Declared In

MSFKMediaControlChannel.h

seekToTimeInterval:resumeState:

Seeks to a new position within the current media item.

- (NSInteger)seekToTimeInterval:(NSTimeInterval)position resumeState:(MSFKMediaControlChannelResumeState)resumeState

Parameters

position

The new time interval from the beginning of the stream.

resumeState

The action to take after the seek operation has finished.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Seeks to a new position within the current media item.

Declared In

MSFKMediaControlChannel.h

seekToTimeInterval:resumeState:customData:

Seeks to a new position within the current media item.

- (NSInteger)seekToTimeInterval:(NSTimeInterval)position resumeState:(MSFKMediaControlChannelResumeState)resumeState customData:(id)customData

Parameters

position

The time interval from the beginning of the stream.

resumeState

The action to take after the seek operation has finished.

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Seeks to a new position within the current media item.

Declared In

MSFKMediaControlChannel.h

setStreamMuted:

Sets whether the stream is muted. Asserts if there is no current media session.

- (NSInteger)setStreamMuted:(BOOL)muted

Parameters

muted

Whether the stream should be muted or unmuted.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Sets whether the stream is muted. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

setStreamMuted:customData:

Sets whether the stream is muted. Asserts if there is no current media session.

- (NSInteger)setStreamMuted:(BOOL)muted customData:(id)customData

Parameters

muted

Whether the stream should be muted or unmuted.

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Sets whether the stream is muted. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

setStreamVolume:

Sets the stream volume. Asserts if there is no current media session.

- (NSInteger)setStreamVolume:(float)volume

Parameters

volume

The new volume, in the range [0.0 - 1.0].

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Sets the stream volume. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

setStreamVolume:customData:

Sets the stream volume. Asserts if there is no current media session.

- (NSInteger)setStreamVolume:(float)volume customData:(id)customData

Parameters

volume

The new volume, in the range [0.0 - 1.0].

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Sets the stream volume. Asserts if there is no current media session.

Declared In

MSFKMediaControlChannel.h

stop

Stops playback of the current media item.

- (NSInteger)stop

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Stops playback of the current media item.

Declared In

MSFKMediaControlChannel.h

stopWithCustomData:

Stops playback of the current media item.

- (NSInteger)stopWithCustomData:(id)customData

Parameters

customData

Custom application-specific data to pass along with the request.

Return Value

The request ID, or kMSFKInvalidRequestID if the message could not be sent.

Discussion

Stops playback of the current media item.

Declared In

MSFKMediaControlChannel.h