interface ToiDlnarendererManager is a TECHNICAL PREVIEW, it may change.
This is an interface to the DLNA DMR (Digital Media Renderer) manager, which is running as a platform service. The DMR manager handles the communication between the DMC and DMR, and sends the relevant requests to the application. The application uses this manager to register for DMR events, specifically media render requests and media render closing. The application then may open the required resource, and notify the DMR manager to continue with the rendering, or deny the request and not render.
import "ToiDlnaRendererManager.idl";
typedef long ToiDlnaRendererManager::TToiRendererSessionId |
Type for a renderer session ID.
typedef sequence< TToiRendererSessionId > ToiDlnaRendererManager::TToiRendererSessionIdSequence |
Type for holding a sequence of renderer session ID's.
typedef long ToiDlnaRendererManager::TToiRendererState |
State identifier used to identify the renderer session's state.
typedef long ToiDlnaRendererManager::TToiRendererStatus |
Status identifiers for a DMR session.
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.
type | The event type of the event to subscribe to. | |
listener | The JavaScript function that will receive events. |
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. |
TToiRendererSessionIdSequence ToiDlnaRendererManager::getRendererSessions | ( | ) |
Retreives all the session id's in REQUEST or ACTIVE states
ids | The list of active session ids. |
ToiDlnaRendererManagerRendererSessionInfo ToiDlnaRendererManager::getSessionInfo | ( | in TToiRendererSessionId | id | ) | raises (TToiInvalidArgumentException) |
Retreives all the information associated with the current media being rendered for the session id provided.
id | The session ID associated with the media in question. |
info | The information associated with the given session id. |
TToiInvalidArgumentException | Raised if the session id is invalid. |
void ToiDlnaRendererManager::releaseInstance | ( | ) |
When an application is done using the Renderer Manager it should gracefully release it by calling this function.
void ToiEventTarget::removeEventListener | ( | in long | type, | |
in ToiEventListener | listener | |||
) | raises (TToiInvalidArgumentException) [inherited] |
This method removes an event listener for a specific event.
type | The event type of the event to remove the listener from. | |
listener | The JavaScript function that was previously added as an event listener. |
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 ToiDlnaRendererManager::updateSessionStatus | ( | in TToiRendererSessionId | id, | |
in TToiRendererStatus | status | |||
) | raises (TToiInvalidArgumentException) |
Notifies the DMR of an update to the session. This typically will occur when 1, we just received a request, so we will activate a session (if successful) or notify a failure to renderer (if unsuccessful); 2, if the rendering resouce becomes unavailable during rendering; or 3, for any other error while rendering. This may cause a change in State, from REQUEST to ACTIVE (on successful REQUEST), from REQUEST to CLOSED (on unsuccessful REQUEST), or from ACTIVE to CLOSED (on error or resource unavailability).
id | The session ID being updated. | |
status | The status for this session's action. |
TToiInvalidArgumentException | Raised if the session id is invalid, or the status is invalid for the state of the session. |
const long ToiDlnaRendererManager::ON_RENDERER_SESSION_CHANGED = 4200 |
This is an Event identifier for ToiDlnaRendererRendererSessionChangedEvent.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.ON_RENDERER_SESSION_CHANGED.
RENDERER_FAILURE notifies the DMR the request to render failed, or the currently rendering media must close, because of an external failure.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_FAILURE.
RENDERER_SUCCESS notifies the DMR the request to render was successful.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_SUCCESS.
RENDERER_UNAVAILABLE notifies the DMR the request to render failed, or the currently rendering media must close, because the renderer is unavailable.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.RENDERER_UNAVAILABLE.
In STATE_SESSION_ACTIVE the DMR is actively rendering the requested session.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_ACTIVE.
In STATE_SESSION_CLOSED the DMR has closed the given session. This can occur at the end of media, an error in rendering, or from an update from the application.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_CLOSED.
In STATE_SESSION_REQUEST the DMR has issued a request to begin rendering and is waiting for an update to begin or close the rendering session.
This constant can also be accessed from toi.consts.ToiDlnaRendererManager.STATE_SESSION_REQUEST.