Millicast Unity SDK
Loading...
Searching...
No Matches
Classes | Public Member Functions | Public Attributes | Properties | Events | List of all members
Dolby.Millicast.McSubscriber Class Reference

The Millicast subscriber class. Allows users to subscribe to Millicast streams. More...

Inheritance diagram for Dolby.Millicast.McSubscriber:

Classes

class  RenderAudioSources
 

Public Member Functions

delegate void DelegateSubscriber (McSubscriber subscriber)
 
delegate void DelegateOnViewerCount (McSubscriber subscriber, int count)
 
delegate void DelegateOnConnectionError (McSubscriber subscribe, string message)
 
delegate void DelegateOnLayerEvent (McSubscriber subscribe, SimulcastInfo info)
 
Layer[] GetSimulcastLayers ()
 Returns the simulcast layers available for the incoming video stream if its a simulcast stream. Returns null if the stream is not simulcast.
 
void UpdateMeshRendererMaterial ()
 This will render incoming streams onto the mesh renderer of this object, if it exists.
 
void ClearRenderMaterials ()
 This will clear all render material Targets for the incoming video stream.
 
void Subscribe ()
 Subscribe to a stream.
 
void UnSubscribe ()
 UnSubscribe from a stream.
 
void AddVideoRenderTarget (Material material)
 Add a material to display the incoming remote video stream on. The material's main texture will be replaced with the remote video stream texture when it is available. Using this to replace a GUI component's material will not work. Use the RawImage overload instead.

 
void RemoveVideoRenderTarget (Material material)
 Stop rendering the remote video stream on the previously given material.
 
void RemoveVideoRenderTarget (RawImage image)
 Stop rendering the remote video stream on the previously given RawImage.
 
void AddVideoRenderTarget (RawImage image)
 Add a UI RawImage to display the remote video stream on. The RawImage's texture will be replaced with the remote video stream texture when it is available. Use this when you want to use render the remote stream in a GUI.
 
void AddRenderAudioSource (AudioSource source)
 Add an audio source that will render the received audio stream.
 
void RemoveRenderAudioSource (AudioSource source)
 Remove an audio source so that it stops rendering.
 
void SetSimulcastLayer (Layer layer)
 Set a simulcast layer.
 

Public Attributes

AudioOutputType audioOutputType
 
RenderAudioSources OutputAudioSources
 Manually set the audio sources to render to. This is used when you want utilise the Unity Inspector UI.
 
VirtualAudioSpeaker OutputAudioSpeakers
 

Properties

bool isSubscribing = false [get]
 This boolean indicates whether the subscriber is currently subscribing to a stream.
 
string streamName [get, set]
 The stream name to subscribe to.
 
Credentials credentials = null [get, set]
 
List< Material > renderMaterials [get]
 Manually add materials to render the incoming video stream on. is used when you want utilise the Unity Inspector UI. Use this only to render onto 3D objects.
 
List< RawImage > renderImages [get]
 Manually add images to render the incoming video stream on. is used when you want utilise the Unity Inspector UI. This is to render in a GUI application only.
 
List< AudioSource > renderAudioSources [get]
 

Events

DelegateSubscriber OnSubscribing
 Event called when the publisher is publishing (i.e. media content is being delivered to the Millicast service.)
 
DelegateOnViewerCount OnViewerCount
 Event called when the viewer count has been updated.
 
DelegateOnLayerEvent OnSimulcastlayerInfo
 Event called when the Simulcast Layers data event triggered.
 
DelegateOnConnectionError OnConnectionError
 Event called when the there is a connection error to the service.
 

Detailed Description

The Millicast subscriber class. Allows users to subscribe to Millicast streams.

Member Function Documentation

◆ AddRenderAudioSource()

void Dolby.Millicast.McSubscriber.AddRenderAudioSource ( AudioSource  source)

Add an audio source that will render the received audio stream.

Parameters
sourceA Unity AudioSource instance.

◆ AddVideoRenderTarget() [1/2]

void Dolby.Millicast.McSubscriber.AddVideoRenderTarget ( Material  material)

Add a material to display the incoming remote video stream on. The material's main texture will be replaced with the remote video stream texture when it is available. Using this to replace a GUI component's material will not work. Use the RawImage overload instead.

Parameters
materialA Unity Material.

◆ AddVideoRenderTarget() [2/2]

void Dolby.Millicast.McSubscriber.AddVideoRenderTarget ( RawImage  image)

Add a UI RawImage to display the remote video stream on. The RawImage's texture will be replaced with the remote video stream texture when it is available. Use this when you want to use render the remote stream in a GUI.

Parameters
imageA Unity RawImage.

◆ RemoveRenderAudioSource()

void Dolby.Millicast.McSubscriber.RemoveRenderAudioSource ( AudioSource  source)

Remove an audio source so that it stops rendering.

Parameters
sourceA previously added Unity AudioSource instance.

◆ RemoveVideoRenderTarget() [1/2]

void Dolby.Millicast.McSubscriber.RemoveVideoRenderTarget ( Material  material)

Stop rendering the remote video stream on the previously given material.

Parameters
materialA Unity Material.

◆ RemoveVideoRenderTarget() [2/2]

void Dolby.Millicast.McSubscriber.RemoveVideoRenderTarget ( RawImage  image)

Stop rendering the remote video stream on the previously given RawImage.

Parameters
imageA Unity RawImage.

◆ SetSimulcastLayer()

void Dolby.Millicast.McSubscriber.SetSimulcastLayer ( Layer  layer)

Set a simulcast layer.

Parameters
layerExpects Layer object which can be found in Layers class in SimulcastInfo.

The documentation for this class was generated from the following file: