Namespace: Stream

Stream

Represents media stream.
Source:
See:

Methods

(inner) available() → {Promise}

–°hecks the availability of stream on the server
Source:
Returns:
Resolves if is stream available, otherwise rejects
Type
Promise

(inner) fullScreen()

Request full screen for player stream
Source:

(inner) getInfo() → {string}

Get stream info
Source:
Returns:
Info
Type
string

(inner) getNetworkBandwidth() → {number}

Get network bandwidth reported by server, works only for subscribe Stream
Source:
Returns:
Network bandwidth in bps or -1
Type
number

(inner) getRecordInfo() → {string}

Get record file name
Source:
Returns:
File name
Type
string

(inner) getRemoteBitrate() → {number}

Get remote bitrate reported by server, works only for subscribe Stream
Source:
Returns:
Remote bitrate in bps or -1
Type
number

(inner) getStats(callbackFn) → {Object}

Get statistics
Parameters:
Name Type Description
callbackFn callbackFn The callback that handles response
Source:
Returns:
Stream audio\video statistics
Type
Object

(inner) getVolume() → {number}

Get current volume
Source:
Returns:
Volume or -1 if audio is not available
Type
number

(inner) id() → {string}

Get stream id.
Source:
Returns:
Stream id
Type
string

(inner) isAudioMuted() → {boolean}

Check outgoing audio mute state
Source:
Returns:
True if audio is muted or not available
Type
boolean

(inner) isRemoteAudioMuted()

Is remote audio muted
Source:

(inner) isVideoMuted() → {boolean}

Check outgoing video mute state
Source:
Returns:
True if video is muted or not available
Type
boolean

(inner) muteAudio()

Mute outgoing audio
Source:

(inner) muteRemoteAudio()

Mute remote audio
Source:

(inner) muteVideo()

Mute outgoing video
Source:

(inner) name() → {string}

Get stream name.
Source:
Returns:
Stream name
Type
string

(inner) on(event, callback) → {Stream}

Add stream event callback.
Parameters:
Name Type Description
event string One of Flashphoner.constants.STREAM_STATUS events
callback Stream~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
Stream callback was attached to
Type
Stream

(inner) play()

Play stream.
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.NEW
Type
Error

(inner) publish()

Publish stream.
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.NEW
Type
Error

(inner) published() → {Boolean}

Is stream published.
Source:
Returns:
True if stream published, otherwise false
Type
Boolean

(inner) setMicrophoneGain()

Set Microphone Gain
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) setVolume(volume)

Set volume of remote media
Parameters:
Name Type Description
volume number Volume between 0 and 100
Source:

(inner) snapshot()

Request remote stream snapshot.
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.NEW
Type
Error

(inner) status() → {string}

Get stream status.
Source:
Returns:
Type
string

(inner) stop()

Stop stream.
Source:

(inner) switchCam()

Switch camera in real-time. Works only with WebRTC
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) switchMic()

Switch microphone in real-time. Works only with WebRTC
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) switchToCam()

Switch to cam in real-time. Works only with WebRTC
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) switchToScreen()

Switch to screen in real-time. Works only with WebRTC
Source:
Throws:
Error if stream status is not Flashphoner.constants.STREAM_STATUS.PUBLISHING
Type
Error

(inner) unmuteAudio()

Unmute outgoing audio
Source:

(inner) unmuteRemoteAudio()

Unmute remote audio
Source:

(inner) unmuteVideo()

Unmute outgoing video
Source:

(inner) videoResolution() → {Object}

Get stream video size
Source:
Returns:
Video size
Type
Object

Type Definitions

eventCallback(stream)

Stream event callback.
Parameters:
Name Type Description
stream Stream Stream that corresponds to the event
Source: