Method Summary
| getContentId ( ) → contentId |
Returns the unique content identifier for the recorded content. This identifier is recognized by the ToiContentService. |
|
getParameter
(
|
Get the current value of a parameter. |
|
getParameters
(
|
Get the values of several parameters. |
| getSessionId ( ) → id |
Returns the session identifier. This identifier can be used to open a session object with ToiMediaService#openSession. |
| getState ( ) → state |
Returns the current state of the media recorder instance. |
| getUrl ( ) → url |
Returns the URL for the media stream. |
| releaseInstance ( ) |
This function releases the resources used by this instance. When this function returns all observers has also been released. |
|
subscribeParameter
(
|
This function makes the application subscribe to updates of a specific named parameter. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaRecorderParameterChangedEvent notification if the parameter already has a value. |
|
subscribeParameters
(
|
This function makes the application subscribe to updates of the given list of parameters. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaRecorderParameterChangedEvent notification if the parameter already has a value. |
|
unsubscribeParameter
(
|
This function undoes the effect of a previous call to ToiMediaRecorderBase#subscribeParameter. Any parameter that has not been subscribed to will simply be ignored. |
|
unsubscribeParameters
(
|
This function undoes the effect of a previous call to ToiMediaRecorderBase#subscribeParameters. Any parameters that has not been subscribed to will simply be ignored. |
Inherited Methods
|
addEventListener
(
|
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. |
|
removeEventListener
(
|
This method removes an event listener for a specific event. |
Type Definitions
|
Identifier that uniquely identifies content. This maps to ToiContentService.ToiContentId. |
|
|
|
|
|
State identifier used to identify the media recorder state. |
|
Methods
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.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener The JavaScript function that will receive events.
Throws:
-
ToiInvalidArgumentException 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.
Returns the unique content identifier for the recorded content. This identifier is recognized by the ToiContentService.
Throws:
-
ToiSessionViolationException Raised if the recorder is in ToiMediaRecorderBase.STATE_IDLE.
Returns:
-
Type: ToiMediaRecorderBase.ToiContentId
The content identifier.
Get the current value of a parameter.
See also:
Parameters:
-
Name Type Description namestring Name of the requested parameter.
Throws:
-
ToiInvalidArgumentException Raised if the parameter name is invalid or not recognized.
Returns:
-
Type: string
The current value of the parameter.
Get the values of several parameters.
See also:
Parameters:
-
Name Type Description namesArray.<ToiMediaSession.ToiParameterName> (Or a single ToiMediaSession.ToiParameterName.) A list of parameter names. A single element can be passed directly and does not need to be passed in an array.
Returns:
-
Type: Array.<ToiMediaSession.ToiParameterInfo>
A list of the returned parameters. If a parameter does not exist (is not set), the status of the corresponding parameter is set to ToiMediaSession.STATUS_NO_PARAMETER.
Returns the session identifier. This identifier can be used to open a session object with ToiMediaService#openSession.
See also:
Throws:
-
ToiSessionViolationException Raised if the recorder is in ToiMediaRecorderBase.STATE_IDLE.
Returns:
-
Type: ToiMediaSession.ToiSessionId
The session identifier.
Returns the current state of the media recorder instance.
Returns:
-
Type: ToiMediaRecorderBase.ToiMediaRecorderState
The current recorder state.
Returns the URL for the media stream.
Throws:
-
ToiSessionViolationException Raised if the recorder is in ToiMediaRecorderBase.STATE_IDLE.
Returns:
-
Type: string
The URL for the media stream.
This function releases the resources used by this instance. When this function returns all observers has also been released.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener The JavaScript function that was previously added as an event listener.
Throws:
-
ToiInvalidArgumentException 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 has not previously been added.
This function makes the application subscribe to updates of a specific named parameter. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaRecorderParameterChangedEvent notification if the parameter already has a value.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namestring The name of the parameter for which changes the application wants to subscribe to.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered.
This function makes the application subscribe to updates of the given list of parameters. The first time an application subscribes to a specific parameter there will be an immediate ToiMediaRecorderParameterChangedEvent notification if the parameter already has a value.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namesArray.<ToiMediaSession.ToiParameterName> (Or a single ToiMediaSession.ToiParameterName.) The list of names of parameters. A single element can be passed directly and does not need to be passed in an array.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered.
ToiUnavailableException Raised if the recoder is temporarily unavailable due to platform resource management.
This function undoes the effect of a previous call to ToiMediaRecorderBase#subscribeParameter. Any parameter that has not been subscribed to will simply be ignored.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namestring The name of the parameter that the application is no longer interested in.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered.
This function undoes the effect of a previous call to ToiMediaRecorderBase#subscribeParameters. Any parameters that has not been subscribed to will simply be ignored.
See also:
Parameters:
-
Name Type Description eventListenerToiEventListener The eventListener that has been registered.
namesArray.<ToiMediaSession.ToiParameterName> (Or a single ToiMediaSession.ToiParameterName.) The list of parameter names. A single element can be passed directly and does not need to be passed in an array.
Throws:
-
ToiInvalidArgumentException Raised if the address name is invalid or not registered.
ToiUnavailableException Raised if the recorder is temporarily unavailable due to platform resource management.
Members
This is an Event identifier for ToiMediaRecorderParameterChangedEvent.
Tells the observer that the value has changed for one of the parameters that the observer is subscribing to.
This is an Event identifier for ToiMediaRecorderStateChangedEvent.
A call to this function tells the observer that the media recorder state has changed. The application is not notified this way about implicit state changes triggered by commands from the application itself.
Note that there is no timing constraint on these messages, and they may arrive late in certain situations. For example, the application may receive a call to this function about a state transition after the application has successfully called ToiMediaRecorder#close and thereby ended the session. This implies that the application should take calls to this function as indications to state transitions that has in fact happened, but it cannot say for certain when these state transitions occurred.
In ToiMediaRecorderBase.STATE_CONNECTING the media recorder has an active session and is in the process of establishing a connection to a media stream source.
In ToiMediaRecorderBase.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.
In ToiMediaRecorderBase.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 ToiSessionViolationException in ToiMediaRecorderBase.STATE_IDLE.
In ToiMediaRecorderBase.STATE_PAUSED the media recorder has a connection to a media source but is not yet recording the stream.
In ToiMediaRecorderBase.STATE_RECORDING the media recorder has a connection to a media source and records the stream.