Show / Hide Table of Contents

    Interface IMediaPlatform

    Interface to the MediaPlatform.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Microsoft.Skype.Bots.Media
    Assembly: Microsoft.Skype.Bots.Media.dll
    Syntax
    public interface IMediaPlatform : IDisposable

    Properties

    CurrentHealth

    The current health status of the media platform.

    Declaration
    MediaPlatformHealthStatus CurrentHealth { get; }
    Property Value
    Type Description
    MediaPlatformHealthStatus

    Methods

    CreateMediaConfiguration(IAudioSocket)

    Returns a serialized MediaConfiguration object representing the socket so that the Skype calling cloud can establish an audio/video call to the bot.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket)
    Parameters
    Type Name Description
    IAudioSocket audioSocket

    Socket that handles audio.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    Serialized MediaConfiguration object.

    Exceptions
    Type Condition
    InvalidOperationException

    MediaPlatform is not initialized.

    SkypeMediaException

    The media platform is currently overloaded and cannot handle new calls.

    CreateMediaConfiguration(IAudioSocket, IDataSocket)

    Reserved for the internal use.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket, IDataSocket dataSocket)
    Parameters
    Type Name Description
    IAudioSocket audioSocket
    IDataSocket dataSocket
    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    CreateMediaConfiguration(IAudioSocket, IVideoSocket)

    Returns a serialized MediaConfiguration object representing the sockets so that the Skype calling cloud can establish an audio/video call to the bot.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket, IVideoSocket videoSocket)
    Parameters
    Type Name Description
    IAudioSocket audioSocket

    Socket that handles audio.

    IVideoSocket videoSocket

    Socket that handles video.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    Serialized MediaConfiguration object.

    Exceptions
    Type Condition
    ArgumentException

    A VideoSocket is not configured correctly.

    InvalidOperationException

    MediaPlatform is not initialized.

    SkypeMediaException

    The media platform is currently overloaded and cannot handle new calls.

    CreateMediaConfiguration(IAudioSocket, IList<IVideoSocket>)

    Returns a serialized MediaConfiguration object representing the sockets so that the Skype calling cloud can establish an audio/video call to the bot.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket, IList<IVideoSocket> videoSockets)
    Parameters
    Type Name Description
    IAudioSocket audioSocket

    Socket that handles audio.

    IList<IVideoSocket> videoSockets

    Ordered list of video sockets. If multiview sockets are provided, only the first one can have a send direction (ie. send only or send receive) and all the sockets should have a receive direction.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    Serialized MediaConfiguration object.

    Exceptions
    Type Condition
    ArgumentException

    A VideoSocket is not configured correctly.

    InvalidOperationException

    MediaPlatform is not initialized.

    SkypeMediaException

    The media platform is currently overloaded and cannot handle new calls.

    CreateMediaConfiguration(IAudioSocket, IList<IVideoSocket>, IVideoSocket)

    Returns a serialized MediaConfiguration object representing the sockets so that the Skype calling cloud can establish an audio/video/video-based screen sharing call to the bot.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket, IList<IVideoSocket> videoSockets, IVideoSocket vbssSocket)
    Parameters
    Type Name Description
    IAudioSocket audioSocket

    Socket that handles audio.

    IList<IVideoSocket> videoSockets

    Ordered list of video sockets. If multiview sockets are provided, only the first one can have a send direction (ie. send only or send receive) and all the sockets should have a receive direction.

    IVideoSocket vbssSocket

    Video socket for the video-based screen sharing (VBSS) modality. Socket must be configured as RecvOnly.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject
    Exceptions
    Type Condition
    ArgumentException

    A VideoSocket is not configured correctly.

    InvalidOperationException

    MediaPlatform is not initialized, or a vbssSocket is configured to be sendonly or sendrecv.

    SkypeMediaException

    The media platform is currently overloaded and cannot handle new calls.

    CreateMediaConfiguration(IAudioSocket, IList<IVideoSocket>, IVideoSocket, IDataSocket)

    Reserved for the internal use.

    Declaration
    JObject CreateMediaConfiguration(IAudioSocket audioSocket, IList<IVideoSocket> videoSockets, IVideoSocket vbssSocket, IDataSocket dataSocket)
    Parameters
    Type Name Description
    IAudioSocket audioSocket
    IList<IVideoSocket> videoSockets
    IVideoSocket vbssSocket
    IDataSocket dataSocket
    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject

    CreateMediaConfiguration(IVideoSocket)

    Returns a serialized mediaConfiguration object representing the socket so that the Skype calling cloud can establish a video-based screen sharing call to the bot.

    Declaration
    JObject CreateMediaConfiguration(IVideoSocket vbssSocket)
    Parameters
    Type Name Description
    IVideoSocket vbssSocket

    Video socket for the video-based screen sharing (VBSS) modality. Socket must be configured as RecvOnly.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JObject
    Exceptions
    Type Condition
    ArgumentException

    A VideoSocket is not configured correctly.

    InvalidOperationException

    MediaPlatform is not initialized, or a vbssSocket is configured to be sendonly or sendrecv.

    SkypeMediaException

    The media platform is currently overloaded and cannot handle new calls.

    GetCurrentTimestamp()

    Get a current timestamp, in 100-ns units. To be used when sourcing media buffers.

    Declaration
    long GetCurrentTimestamp()
    Returns
    Type Description
    Int64

    Initialize(MediaPlatformSettings)

    Initializes the Media Platform for Bot.

    Declaration
    void Initialize(MediaPlatformSettings settings)
    Parameters
    Type Name Description
    MediaPlatformSettings settings

    Settings to initialize the Bot Media Platform.

    Events

    MediaPlatformHealthChanged

    Raised when there is a change in the media platform's health status. The event arguments report the current and previous platform health conditions.

    Declaration
    event EventHandler<MediaPlatformHealthChangedEventArgs> MediaPlatformHealthChanged
    Event Type
    Type Description
    EventHandler<MediaPlatformHealthChangedEventArgs>
    Remarks

    A bot application which may handle very high call volumes or perform complex real-time media processing should monitor this event for changes in the media platform health status. When the event reports the platform health status has become HeavilyLoaded, the application should avoid starting new bot calls on the machine instance until the health status returns back to Normal.

    Back to top Copyright (c) Microsoft Corporation. All rights reserved.