Media API for the Kurento Web SDK
- Copyright:
- 2013-2015 Kurento (https://kurento.openvidu.io/)
- License:
- ALv2
- Source:
Classes
Methods
(static) checkHubPort(key, value)
Checker for module:core.HubPort
Parameters:
Name | Type | Description |
---|---|---|
key |
external:String | |
value |
module:core.HubPort |
(static) checkMediaPipeline(key, value)
Checker for module:core.MediaPipeline
Parameters:
Name | Type | Description |
---|---|---|
key |
external:String | |
value |
module:core.MediaPipeline |
(static) checkPassThrough(key, value)
Checker for module:core.PassThrough
Parameters:
Name | Type | Description |
---|---|---|
key |
external:String | |
value |
module:core.PassThrough |
Events
ConnectionStateChanged
This event is raised when the connection between two peers changes. It
contains the old and the new state. Possible values are
- CONNECTED
- DISCONNECTED
Type:
Properties:
Name | Type | Description |
---|---|---|
oldState |
module:core/complexTypes.ConnectionState | The previous state |
newState |
module:core/complexTypes.ConnectionState | The new state |
ElementConnected
Indicates that an element has been connected to another
Type:
Properties:
Name | Type | Description |
---|---|---|
sink |
module:core/abstracts.MediaElement | sink element in new connection |
mediaType |
module:core/complexTypes.MediaType | Media type of the connection |
sourceMediaDescription |
external:String | Description of the source media |
sinkMediaDescription |
external:String | Description of the sink media |
ElementDisconnected
Indicates that an element has been disconnected from another
Type:
Properties:
Name | Type | Description |
---|---|---|
sink |
module:core/abstracts.MediaElement | sink element in previous connection |
mediaType |
module:core/complexTypes.MediaType | Media type of the previous connection |
sourceMediaDescription |
external:String | Description of the source media |
sinkMediaDescription |
external:String | Description of the sink media |
Error
Fired whenever an undefined error related to the MediaObject has occurred
Type:
Properties:
Name | Type | Description |
---|---|---|
description |
external:String | Textual description of the error |
errorCode |
external:Integer | Server side integer error code |
type |
external:String | Integer code as a String |
Media
Base for all events raised by elements in the Kurento media server.
Type:
Properties:
Name | Type | Description |
---|---|---|
type |
external:String | Type of event that was raised |
MediaFlowInStateChanged
Fired when the incoming media flow begins or ends. The event contains:
- State: whether the endpoint is receiving media (FLOWING) or not (NOT_FLOWING).
- padName. The name of the pad that changed state.
- MediaType: The type of media flowing.
Type:
Properties:
Name | Type | Description |
---|---|---|
state |
module:core/complexTypes.MediaFlowState | Current media state |
padName |
external:String | Name of the pad which has media |
mediaType |
module:core/complexTypes.MediaType | Type of media that is flowing |
MediaFlowOutStateChanged
Fired when the outgoing media flow begins or ends. The event contains:
- State: whether the endpoint is sending media (FLOWING) or not (NOT_FLOWING).
- padName. The name of the pad that changed state.
- MediaType: The type of media flowing.
Type:
Properties:
Name | Type | Description |
---|---|---|
state |
module:core/complexTypes.MediaFlowState | Current media state |
padName |
external:String | Name of the pad which has media |
mediaType |
module:core/complexTypes.MediaType | Type of media that is flowing |
MediaSessionStarted
Event raised when the endpoint has successfully finished the signaling stage,
and is ready for establishing a connection.
This event is a simplified version of the WebRTC's RTCPeerConnection.signalingstatechange event, and can be used to verify that the endpoint has been able to finish negotiations at the signaling plane.
It contains no data, and will be raised in these scenarios:
-
A call to
SdpEndpoint.processOffer()
has processed a remote SDP Offer and has generated a local SDP Answer. Equivalent to WebRTC's have-local-pranswer. -
A call to
SdpEndpoint.processAnswer()
has processed a remote SDP Answer. Equivalent to WebRTC's have-remote-pranswer. - An HttpEndpoint has received a GET or POST request.
Note that SdpEndpoint is the base class of the RTP classes, so this description applies to both RtpEndpoint and WebRtcEndpoint.
MediaSessionTerminated
Event raised when the endpoint has finished its operation and the connection
has
been tore down.
This event contains no data, and will be raised in these scenarios:
- An HttpEndpoint has finished serving on its URL, or the URL expired.
MediaStateChanged
This event is fired when the media connection between two peers changes,
based on the RTCP packet flow. It contains the old and the new state.
Possible values are
- CONNECTED
- DISCONNECTED
Type:
Properties:
Name | Type | Description |
---|---|---|
oldState |
module:core/complexTypes.MediaState | The previous state |
newState |
module:core/complexTypes.MediaState | The new state |
MediaTranscodingStateChanged
Event fired when an incoming media begins and codec transcoding is either
required or not.
Type:
Properties:
Name | Type | Description |
---|---|---|
state |
module:core/complexTypes.MediaTranscodingState | Current transcoding state; either enabled or disabled. |
binName |
external:String | Name of the GStreamer bin which is processing the media. |
mediaType |
module:core/complexTypes.MediaType | Type of media that is being processed; either audio or video. |
ObjectCreated
Indicates that an object has been created on the media server
Type:
Properties:
Name | Type | Description |
---|---|---|
object |
module:core/abstracts.MediaObject | The object that has been created |
ObjectDestroyed
Indicates that an object has been destroyed on the media server
Type:
Properties:
Name | Type | Description |
---|---|---|
objectId |
external:String | The id of the object that has been destroyed |
RaiseBase
Properties:
Name | Type | Description |
---|---|---|
source |
module:core/abstracts.MediaObject | Object that raised the event |
timestampMillis |
external:String | The timestamp associated with this event: Milliseconds elapsed since the UNIX Epoch (Jan 1, 1970, UTC). |
tags |
module:core/complexTypes.Tag |
UriEndpointStateChanged
Indicates the new state of the endpoint
Type:
Properties:
Name | Type | Description |
---|---|---|
state |
module:core/complexTypes.UriEndpointState | the new state |