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.
Member Typedef Documentation
State identifier used to identify the media recorder state.
Member Function Documentation
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. |
Returns the asset used for recording.
- Return values:
-
| assetId | The asset identifier. |
- Exceptions:
-
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:
-
- See also:
- ToiMediaService::openSession()
Returns the current state of the media recorder instance.
- Return values:
-
| state | The current recorder state. |
Returns the URL for the media stream.
- Return values:
-
| url | The URL for the media stream. |
- Exceptions:
-
void ToiMediaRecorderBase::releaseInstance |
( |
|
) |
|
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.
- 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. |
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:
-
- See also:
- ToiMediaRecorderBase::unsubscribeParameter()
Member Data Documentation
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.