Source: node_modules/kurento-client-core/lib/events.js

/* Autogenerated with Kurento Idl */

/*
 * (C) Copyright 2013-2015 Kurento (https://kurento.openvidu.io/)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


/**
 * This event is raised when the connection between two peers changes. It 
 * contains the old and the new state. Possible values are
 *       <ul>
 *         <li>CONNECTED</li>
 *         <li>DISCONNECTED</li>
 *       </ul>
 *
 * @event module:core#ConnectionStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.ConnectionState} oldState
 *  The previous state
 * @property {module:core/complexTypes.ConnectionState} newState
 *  The new state
 */

/**
 * Indicates that an element has been connected to another
 *
 * @event module:core#ElementConnected
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/abstracts.MediaElement} sink
 *  sink element in new connection
 * @property {module:core/complexTypes.MediaType} mediaType
 *  Media type of the connection
 * @property {external:String} sourceMediaDescription
 *  Description of the source media
 * @property {external:String} sinkMediaDescription
 *  Description of the sink media
 */

/**
 * Indicates that an element has been disconnected from another
 *
 * @event module:core#ElementDisconnected
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/abstracts.MediaElement} sink
 *  sink element in previous connection
 * @property {module:core/complexTypes.MediaType} mediaType
 *  Media type of the previous connection
 * @property {external:String} sourceMediaDescription
 *  Description of the source media
 * @property {external:String} sinkMediaDescription
 *  Description of the sink media
 */

/**
 * Fired whenever an undefined error related to the MediaObject has occurred
 *
 * @event module:core#Error
 *
 * @type {module:core#event:RaiseBase}
 *
 * @property {external:String} description
 *  Textual description of the error
 * @property {external:Integer} errorCode
 *  Server side integer error code
 * @property {external:String} type
 *  Integer code as a String
 */

/**
 * Base for all events raised by elements in the Kurento media server.
 *
 * @event module:core#Media
 *
 * @type {module:core#event:RaiseBase}
 *
 * @property {external:String} type
 *  Type of event that was raised
 */

/**
 * Fired when the incoming media flow begins or ends. The event contains:
 *       <ul>
 *         <li>State: whether the endpoint is receiving media (FLOWING) or not 
 *         (NOT_FLOWING).</li>
 *         <li>padName. The name of the pad that changed state.</li>
 *         <li>MediaType: The type of media flowing.</li>
 *       </ul>
 *
 * @event module:core#MediaFlowInStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.MediaFlowState} state
 *  Current media state
 * @property {external:String} padName
 *  Name of the pad which has media
 * @property {module:core/complexTypes.MediaType} mediaType
 *  Type of media that is flowing
 */

/**
 * Fired when the outgoing media flow begins or ends. The event contains:
 *       <ul>
 *         <li>State: whether the endpoint is sending media (FLOWING) or not 
 *         (NOT_FLOWING).</li>
 *         <li>padName. The name of the pad that changed state.</li>
 *         <li>MediaType: The type of media flowing.</li>
 *       </ul>
 *
 * @event module:core#MediaFlowOutStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.MediaFlowState} state
 *  Current media state
 * @property {external:String} padName
 *  Name of the pad which has media
 * @property {module:core/complexTypes.MediaType} mediaType
 *  Type of media that is flowing
 */

/**
 * Event raised when the endpoint has successfully finished the signaling stage,
 * and is ready for establishing a connection.
 * <p>
 *   This event is a simplified version of the WebRTC's
 *   <a
 *     href='https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/signalingstatechange_event'
 *     >RTCPeerConnection.signalingstatechange event</a
 *   >, and can be used to verify that the endpoint has been able to finish
 *   negotiations at the signaling plane.
 * </p>
 * <p>It contains no data, and will be raised in these scenarios:</p>
 * <ul>
 *   <li>
 *     A call to <code>SdpEndpoint.processOffer()</code> has processed a remote
 *     <i>SDP Offer</i> and has generated a local <i>SDP Answer</i>. Equivalent 
 *     to
 *     WebRTC's
 *     <a
 *       href='https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/signalingState#have-local-pranswer'
 *       >have-local-pranswer</a
 *     >.
 *   </li>
 *   <li>
 *     A call to <code>SdpEndpoint.processAnswer()</code> has processed a remote
 *     <i>SDP Answer</i>. Equivalent to WebRTC's
 *     <a
 *       href='https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/signalingState#have-remote-pranswer'
 *       >have-remote-pranswer</a
 *     >.
 *   </li>
 *   <li>
 *     An <em>HttpEndpoint</em> has received a <i>GET</i> or <i>POST</i> 
 *     request.
 *   </li>
 * </ul>
 * <p>
 *   Note that <i>SdpEndpoint</i> is the
 *   <a
 *     href='https://doc-kurento.readthedocs.io/en/latest/features/kurento_modules.html#endpoints'
 *     >base class of the RTP classes</a
 *   >, so this description applies to both <i>RtpEndpoint</i> and
 *   <i>WebRtcEndpoint</i>.
 * </p>
 *
 * @event module:core#MediaSessionStarted
 */

/**
 * Event raised when the endpoint has finished its operation and the connection 
 * has
 * been tore down.
 * <p>This event contains no data, and will be raised in these scenarios:</p>
 * <ul>
 *   <li>
 *     An <em>HttpEndpoint</em> has finished serving on its URL, or the URL
 *     expired.
 *   </li>
 * </ul>
 *
 * @event module:core#MediaSessionTerminated
 */

/**
 * 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
 *       <ul>
 *         <li>CONNECTED</li>
 *         <li>DISCONNECTED</li>
 *       </ul>
 *
 * @event module:core#MediaStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.MediaState} oldState
 *  The previous state
 * @property {module:core/complexTypes.MediaState} newState
 *  The new state
 */

/**
 * Event fired when an incoming media begins and codec transcoding is either 
 * required or not.
 *
 * @event module:core#MediaTranscodingStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.MediaTranscodingState} state
 *  Current transcoding state; either enabled or disabled.
 * @property {external:String} binName
 *  Name of the GStreamer bin which is processing the media.
 * @property {module:core/complexTypes.MediaType} mediaType
 *  Type of media that is being processed; either audio or video.
 */

/**
 * Indicates that an object has been created on the media server
 *
 * @event module:core#ObjectCreated
 *
 * @type {module:core#event:RaiseBase}
 *
 * @property {module:core/abstracts.MediaObject} object
 *  The object that has been created
 */

/**
 * Indicates that an object has been destroyed on the media server
 *
 * @event module:core#ObjectDestroyed
 *
 * @type {module:core#event:RaiseBase}
 *
 * @property {external:String} objectId
 *  The id of the object that has been destroyed
 */

/**
 *
 * @event module:core#RaiseBase
 *
 * @property {module:core/abstracts.MediaObject} source
 *  Object that raised the event
 * @property {external:String} timestampMillis
 *  The timestamp associated with this event: Milliseconds elapsed since the 
 *  UNIX Epoch (Jan 1, 1970, UTC).
 * @property {module:core/complexTypes.Tag} tags
 */

/**
 * Indicates the new state of the endpoint
 *
 * @event module:core#UriEndpointStateChanged
 *
 * @type {module:core#event:Media}
 *
 * @property {module:core/complexTypes.UriEndpointState} state
 *  the new state
 */