Local
The local stream
Member Summary
| Public Members | ||
| public get | 
       constraints: MediaConstraints The Media Constraints.  | 
    |
| public set | 
       constraints(constraints: MediaConstraints) The Media Constraints.  | 
    |
| public | 
      
       The local DOM container element where the Local~media is displayed  | 
    |
| public | 
      
       is the video is loaded int the local DOM media element  | 
    |
| public get | 
      
       The associated MediaStream  | 
    |
| public set | 
      
       The associated MediaStream  | 
    |
| public | 
      
       Indicates if a track is muted  | 
    |
| public | 
      
       The local DOM media element where the Local~media is displayed  | 
    |
| public | 
      
       List of the PeerConnections associated to this local stream  | 
    |
| public | 
      
       The uid of the room the stream is published in  | 
    |
| public | 
      
       Local stream status  | 
    |
| public | 
      
       The type of the stream  | 
    |
| public | 
      
       The uid of this stream  | 
    |
Method Summary
| Public Methods | ||
| public | 
      
       Removes stream for published list, closes associated PeerConnections and stops current MediaStream  | 
    |
| public | 
      
       Mute a track of a Stream  | 
    |
| public | 
      
       Register a callback for a specific event  | 
    |
| public | 
      
       Register a callback for a specific event  | 
    |
| public | 
       switchCamera(deviceId: string): Promise<Local, Error> Switch video input device  | 
    |
| public | 
       switchMicrophone(deviceId: string): Promise<Local, Error> Switch audio input device  | 
    |
| public | 
      
       Un-mute a track of a Stream  | 
    |
| public | 
       updateConstraints(constraints: *): * | Promise<TResult> Updates the stream constraints and retrieve the new MediaStream  | 
    |
Public Members
public set constraints(constraints: MediaConstraints) source
The Media Constraints. (defaults to global config)
public peerConnections: PeerConnection[] source
List of the PeerConnections associated to this local stream
Public Methods
public close(): Promise source
Removes stream for published list, closes associated PeerConnections and stops current MediaStream
public mute(track: string, state: boolean) source
Mute a track of a Stream
Example:
stream.mute(Reach.t.VIDEO)
    stream.mute(Reach.t.AUDIO)
// or
stream.mute()
    public off(event: string, callback: function) source
Register a callback for a specific event
Params:
| Name | Type | Attribute | Description | 
| event | string | 
  | 
      The event name (Events/Stream)  | 
    
| callback | function | 
  | 
      The callback for the event  | 
    
public on(event: string, callback: function) source
Register a callback for a specific event
Params:
| Name | Type | Attribute | Description | 
| event | string | The event name (Events/Stream)  | 
    |
| callback | function | The callback for the event  | 
    
public switchCamera(deviceId: string): Promise<Local, Error> source
Switch video input device
Params:
| Name | Type | Attribute | Description | 
| deviceId | string | 
  | 
      A video input device Id or the   | 
    
public switchMicrophone(deviceId: string): Promise<Local, Error> source
Switch audio input device
Params:
| Name | Type | Attribute | Description | 
| deviceId | string | 
  | 
      A audio input device Id  | 
    
public unMute(track: string) source
Un-mute a track of a Stream
Params:
| Name | Type | Attribute | Description | 
| track | string | 
  | 
      The track to mute. (AUDIO, VIDEO, AUDIO_VIDEO)  | 
    
Example:
stream.unMute(Reach.t.VIDEO)
    stream.unMute(Reach.t.AUDIO)
// or
stream.unMute()
    
    
  