Class SpaceVoiceSession
スペースの高レベル WebRTC セッション(発言または聴取)。 IPeerConnectionFactory の実装が必要です。
public sealed class SpaceVoiceSession
- Inheritance
-
SpaceVoiceSession
- Inherited Members
Constructors
SpaceVoiceSession(string, string, string, string, string, string, string, SpacesHttp?, IPeerConnectionFactory?, Action<object>?)
public SpaceVoiceSession(string janusUrl, string vidManToken, string streamName = "", string sessionUuid = "", string display = "", string periscopeUserId = "", string roomId = "", SpacesHttp? http = null, IPeerConnectionFactory? peerConnectionFactory = null, Action<object>? onAudioTrack = null)
Parameters
janusUrlstringvidManTokenstringstreamNamestringsessionUuidstringdisplaystringperiscopeUserIdstringroomIdstringhttpSpacesHttppeerConnectionFactoryIPeerConnectionFactoryonAudioTrackAction<object>
Properties
Display
public string Display { get; }
Property Value
Janus
public JanusClient Janus { get; }
Property Value
OnAudioTrack
リモートの音声トラックを受け取ったときのコールバック。
public Action<object>? OnAudioTrack { get; set; }
Property Value
Pc
public IPeerConnection? Pc { get; }
Property Value
PeriscopeUserId
public string PeriscopeUserId { get; }
Property Value
PublisherId
public long? PublisherId { get; }
Property Value
- long?
RemoteAudio
聴取時に受け取ったリモートの音声トラック(実装固有のオブジェクト)。
public object? RemoteAudio { get; }
Property Value
RoomId
public string RoomId { get; }
Property Value
SessionUuid
public string SessionUuid { get; }
Property Value
StreamName
public string StreamName { get; }
Property Value
Methods
CloseAsync()
public Task CloseAsync()
Returns
ConnectAsync(IReadOnlyList<IceServer>, bool, bool, IList<JsonObject>?, bool, object?)
Janus と WebRTC の接続を確立します。
public Task ConnectAsync(IReadOnlyList<IceServer> iceServers, bool asPublisher = true, bool createRoom = false, IList<JsonObject>? streams = null, bool withDummyPublisher = false, object? audioTrack = null)
Parameters
iceServersIReadOnlyList<IceServer>ICE サーバー(空なら直接接続)。
asPublisherbool発言側として接続するか。
createRoomboolJanus ルームを作るか(ホスト用)。
streamsIList<JsonObject>聴取時に購読するストリーム。
withDummyPublisherboolルーム作成時に dummy publisher を付けるか。
audioTrackobject送信する音声トラック(実装固有のオブジェクト)。
Returns
WaitForPublisherIdAsync(double)
public Task<long> WaitForPublisherIdAsync(double timeoutSeconds = 15)
Parameters
timeoutSecondsdouble