StageStreamLayer
StageStreamLayer:
object
A layer is one quality or variation of media which is being sent from the server from the publisher of the Stage.
Layers can be retrieved a number of ways. At this time they are only available for RemoteStageStreams with a type of StreamType.VIDEO:
- RemoteStageStream.getLayers
- RemoteStageStream.getSelectedLayer
- RemoteStageStream.getHighestQualityLayer
- RemoteStageStream.getLowestQualityLayer
- RemoteStageStreamEvents.LAYER_SELECTED
- RemoteStageStreamEvents.LAYERS_CHANGED
- StageEvents.STAGE_STREAM_LAYERS_CHANGED
- StageEvents.STAGE_STREAM_LAYER_SELECTED
Type declaration
bitrateBps
bitrateBps:
number
The bitrate in bits per second of the layer. This value represents the maximum possible bitrate of the publisher encoder. It may change if the publishers network degrades or improves, either decreasing or increasing the value.
framesPerSecond
framesPerSecond:
number
The frame rate of the layer. Note that this is only relevant for video layers. This value represents the maximum possible frame rate of the publishers encoder. It may change if the publishers network degrades or improves, either decreasing or increasing the value.
height
height:
number
The height of the layer in pixels. Note that this is only relevant for video layers. This value represents the maximum possible height of the publishers encoder. It may change if the publishers network degrades or improves, either decreasing or increasing the value.
Note that height is used to create the traditional quality mappings, and is useful if you want to display quality selectors to users.
e.g. height of 360 pixels
corresponds with 360p
label
label:
string
The label is a generic string derived from the publisher. Typically this
is a readable name that describes the layer (e.g. hi
, mid
, low
).
This label is not guaranteed to be a specific value, and may change dynamically so it should not be used as a key, or reliable value in the application.
selected
selected:
boolean
A boolean describing whether the layer is currently selected by the server. A selected layer is one that is available to display and is sending media. At this time only one layer can be delivered at a time.
width
width:
number
The width of the layer in pixels. Note that this is only relevant for video layers. This value represents the maximum possible width of the publishers encoder. It may change if the publishers network degrades or improves, either decreasing or increasing the value.