[−][src]Function skyway_webrtc_gateway_api::media::open_media_socket
pub async fn open_media_socket(
is_video: bool
) -> Result<SocketInfo<MediaId>, Error>
Have WebRTC Gateway open a socket for feeding media.
This API need to identify whether the media is video or audio. If is_video is true, it's video. Otherwise, it's audio.
It's bindings for POST /media.
Examples
use skyway_webrtc_gateway_api::media::open_media_socket; async fn example() { let result = open_media_socket(true).await; //video let result = open_media_socket(false).await; //audio }