Skip to main content
Version: 1.x

Class PlaybackComponent

Handles the Playback for received ODIN audio data.

Declaration
public class PlaybackComponent : MonoBehaviour

Properties

Mute

The Unity AudioSource mute property

Declaration
public bool Mute { get; set; }

RoomName

Room name for this playback. Change this value to change the PlaybackStream by Rooms from the Client.

Declaration
public string RoomName { get; set; }

PeerId

Peer id for this playback. Change this value to change the PlaybackStream by RemotePeers in the Room.

Declaration
public ulong PeerId { get; set; }

MediaStreamId

Media id for this playback. Change this value to pick a PlaybackStream by media id from peers Medias.

Declaration
public long MediaStreamId { get; set; }

HasActivity

Declaration
public bool HasActivity { get; }

Fields

PlaybackSource

The Unity AudioSource component for playback

Declaration
public AudioSource PlaybackSource

AutoDestroyAudioSource

On true destroy the OdinNative.Unity.Audio.PlaybackComponent.PlaybackSource in dispose to not leak

(AudioSource) or false for manually manage sources

Declaration
public bool AutoDestroyAudioSource

AutoDestroyMediaStream

On true destroy the OdinNative.Odin.Media.MediaStream in dispose to not leak or false for manually manage stream

Declaration
public bool AutoDestroyMediaStream

SampleRate

The playback OdinNative.Core.MediaSampleRate

Declaration
public MediaSampleRate SampleRate

Methods

SetMediaInfo(string, ulong, long)

Declaration
public void SetMediaInfo(string roomName, ulong peerId, long mediaId)
Parameters
TypeName
System.StringroomName
System.UInt64peerId
System.Int64mediaId

GetOdinAudioStreamStats()

Declaration
public NativeBindings.OdinAudioStreamStats GetOdinAudioStreamStats()
Returns

Global.NativeBindings.OdinAudioStreamStats