ToiMediaRecorderBase Interface Reference


Description

The ToiMediaRecorderBase interface is the base interface for recorder instances. It contains only read-only methods and no control functionality.

See also:
ToiMediaService
ToiMediaRecorder

import "ToiMediaRecorderBase.idl";

List of all members.

Public Member Functions

TToiMediaRecorderState getState ()
ToiMediaSession::TToiSessionId getSessionId () raises (TToiSessionViolationException)
string getUrl () raises (TToiSessionViolationException)
string getAssetId () raises (TToiSessionViolationException)
string getParameter (in string name) raises (TToiInvalidArgumentException)
void subscribeParameter (in ToiEventListener eventListener, in string name) raises (TToiInvalidArgumentException)
void unsubscribeParameter (in ToiEventListener eventListener, in string name) raises (TToiInvalidArgumentException)
void releaseInstance ()
void addEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)
void removeEventListener (in long type, in ToiEventListener listener) raises (TToiInvalidArgumentException)

Public Attributes

Events

const long ON_STATE_CHANGED = 1800
const long ON_PARAMETER_CHANGED = 1801
TToiMediaRecorderState

const TToiMediaRecorderState STATE_IDLE = 0
const TToiMediaRecorderState STATE_CONNECTING = 1
const TToiMediaRecorderState STATE_PAUSED = 2
const TToiMediaRecorderState STATE_RECORDING = 3
const TToiMediaRecorderState STATE_FAILED = 4

Public Types

typedef long TToiMediaRecorderState

Member Typedef Documentation

State identifier used to identify the media recorder state.


Member Function Documentation

void ToiEventTarget::addEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException) [inherited]

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Parameters:
type The event type of the event to subscribe to.
listener The JavaScript function that will receive events.
Exceptions:
TInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.
string ToiMediaRecorderBase::getAssetId (  )  raises (TToiSessionViolationException)

Returns the asset used for recording.

Return values:
assetId The asset identifier.
Exceptions:
TToiSessionViolationException If the recorder is in idle state a session violation exception is raised.
string ToiMediaRecorderBase::getParameter ( in string  name  )  raises (TToiInvalidArgumentException)

Get the current value of a parameter.

Parameters:
name Name of the requested parameter.
Return values:
value The current value of the parameter.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
See also:
ToiMediaRecorder::setParameter()
ToiMediaRecorder::unsetParameter()
ToiMediaRecorderBase::subscribeParameter()
ToiMediaSession::TToiSessionId ToiMediaRecorderBase::getSessionId (  )  raises (TToiSessionViolationException)

Returns the session identifier. This identifier can be used to open a session object with (C++) ToiMediaService::OpenSession().

Return values:
id The session identifier.
Exceptions:
TToiSessionViolationException If the player is in STATE_IDLE a session violation exception is raised.
See also:
ToiMediaService::openSession()
TToiMediaRecorderState ToiMediaRecorderBase::getState (  ) 

Returns the current state of the media recorder instance.

Return values:
state The current recorder state.
string ToiMediaRecorderBase::getUrl (  )  raises (TToiSessionViolationException)

Returns the URL for the media stream.

Return values:
url The URL for the media stream.
Exceptions:
TToiSessionViolationException If the recorder is in idle state a session violation exception is raised.
void ToiMediaRecorderBase::releaseInstance (  ) 

This function releases the resources used by this instance. When this function returns all observers has also been released.

void ToiEventTarget::removeEventListener ( in long  type,
in ToiEventListener  listener 
) raises (TToiInvalidArgumentException) [inherited]

This method removes an event listener for a specific event.

Parameters:
type The event type of the event to remove the listener from.
listener The JavaScript function that was previously added as an event listener.
Exceptions:
TInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener had not previously been added.
void ToiMediaRecorderBase::subscribeParameter ( in ToiEventListener  eventListener,
in string  name 
) raises (TToiInvalidArgumentException)

This function makes the application subscribe to updates of a specific named parameter. When the subscription is made there will be an immediate call to (C++) ToiMediaRecorderObserver::OnParameterChanged() if there is a value available.

Parameters:
eventListener ToiEventListener
name The name of the parameter for which changes the application wants to subscribe to.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
See also:
ToiMediaRecorderBase::unsubscribeParameter()
void ToiMediaRecorderBase::unsubscribeParameter ( in ToiEventListener  eventListener,
in string  name 
) raises (TToiInvalidArgumentException)

This function undoes the effect of a previous call to ToiMediaRecorderBase::subscribeParameter().

Parameters:
eventListener ToiEventListener
name The name of the parameter that the application is no longer interested in.
Exceptions:
TToiInvalidArgumentException The parameter name is invalid or not recognized.
See also:
ToiMediaRecorderBase::subscribeParameter()

Member Data Documentation

This is an Event identifier for ToiMediaRecorderParameterChangedEvent.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.ON_PARAMETER_CHANGED.

This is an Event identifier for ToiMediaRecorderStateChangedEvent.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.ON_STATE_CHANGED.

In STATE_CONNECTING the media recorder has an active session and is in the process of establishing a connection to a media stream source.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.STATE_CONNECTING.

In STATE_FAILED the media recorder may or may not have a connection to a media source but the process of getting the stream from that source has failed in some fatal way.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.STATE_FAILED.

In STATE_IDLE there is no active session. The media recorder does not handle a stream, and consequently has no connection to a media stream source. All functions requiring a session will raise a TToiSessionViolationException in STATE_IDLE.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.STATE_IDLE.

In STATE_PAUSED the media recorder has a connection to a media source but is not yet recording the stream.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.STATE_PAUSED.

In STATE_RECORDING the media recorder has a connection to a media source and records the stream.

This constant can also be accessed from toi.consts.ToiMediaRecorderBase.STATE_RECORDING.