Produce

The produce method allows the Local Peer to produce a media stream with a given label and associated application data to share with all Remote Peers.

Parameters

NameTypeDescription
labelstringA unique identifier for the stream
streamMediaStreamThe media stream to produce
stopTrackOnCloseboolean (optional)Stops the track when the producer is closed
appDataObject (optional)Application-level custom data which can be added to the producer for the Local Peer. This data will be available in the producer object and can be used only by the Local Peer.

Example

val producer = huddleClient.localPeer.produce(
  label: "video",
  stream: mediaStream,
  appData: { 'key': "value" },
});

Stop Producing

The stopProducing method allows the Local Peer to stop producing a media stream with a given label.

Parameters

NameTypeDescription
labelstringA unique identifier for the stream

Example

val producer = huddleClient.localPeer.stopProducing( label: "video" );

Events

NameDescriptionReturns
new-producerEmitted when a new producer is created{ label: string; producer: Producer }
Audio/Video Infrastructure designed for developers to empower them to ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.