LocalStream
Interface that represents any local stream.
Methods
addEventListener
- (void
)addEventListener:()eventName Registers a handler for the specified event.
One event can have more than one handler; handlers are executed in order of their registration.
Parameters
eventName:
Event name
listener:
(event: StreamEnded) => void | Promise<void>
Handler function that is triggered when an event of the specified type occurs
options:
Object that specifies characteristics about the event listener
Returns
type:
void
close
- (void
)closeStops capturing media and releases all resources.
Returns
type:
void
removeEventListener
- (void
)removeEventListener:()eventName Registers a handler for the specified event.
One event can have more than one handler; handlers are executed in order of their registration.
Parameters
eventName:
Event name
listener:
(event: StreamEnded) => void | Promise<void>
Handler function that is triggered when an event of the specified type occurs
options:
Object that specifies characteristics about the event listener
Returns
type:
void
Props
id
@property () idStream id.
source
@property () sourceStream source type (local).
sourceDeviceId
@property () sourceDeviceIdMedia device id that produces media data for the local stream.
type
@property () typeStream type.