ZegoPlayerConfig class
Advanced player configuration.
Configure stream resource mode, CDN configuration and other advanced configurations.
Constructors
-
ZegoPlayerConfig(ZegoStreamResourceMode resourceMode, {ZegoCDNConfig? cdnConfig, String? roomID, ZegoVideoCodecID? videoCodecID, ZegoResourceType? sourceResourceType, int? codecTemplateID, ZegoStreamResourceSwitchMode? resourceSwitchMode, ZegoStreamResourceType? resourceWhenStopPublish, int? adaptiveSwitch, List<
int> ? adaptiveTemplateIDList}) - ZegoPlayerConfig.defaultConfig()
- Create a default advanced player config object
Properties
- adaptiveSwitch ↔ int?
-
Whether to enable adaptive switching of streams, 1 means on, 0 means off. Valid only if resourceMode is ZegoStreamResourceModeOnlyL3. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
read / write
-
adaptiveTemplateIDList
↔ List<
int> ? -
Stream adaptive transcoding template ID list. Valid only if resourceMode is ZegoStreamResourceModeOnlyL3. Please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
read / write
- cdnConfig ↔ ZegoCDNConfig?
-
The CDN configuration for playing stream. If set, the stream is play according to the URL instead of the streamID. After that, the streamID is only used as the ID of SDK internal callback.
read / write
- codecTemplateID ↔ int?
-
Preconfigured codec template ID, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- resourceMode ↔ ZegoStreamResourceMode
-
Stream resource mode.
read / write
- resourceSwitchMode ↔ ZegoStreamResourceSwitchMode?
-
Play resource switching strategy mode, the default is ZegoStreamResourceSwitchModeDefault
read / write
- resourceWhenStopPublish ↔ ZegoStreamResourceType?
-
Play resource type when stop publish, the default is ZegoStreamResourceTypeDefault. This setting takes effect only if the user sets resourceMode to ZegoStreamResourceModeDefaut and resourceSwitchMode to ZegoStreamResourceSwitchModeDefault or ZegoStreamResourceSwitchModeSwitchToRTC.
read / write
- roomID ↔ String?
-
The Room ID. It only needs to be filled in the multi-room mode, which indicates which room this stream needs to be bound to. This parameter is ignored in single room mode.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- sourceResourceType ↔ ZegoResourceType?
-
The resource type of the source stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
read / write
- videoCodecID ↔ ZegoVideoCodecID?
-
The video encoding type of the stream, please contact ZEGO technical support if you need to use it, otherwise this parameter can be ignored.
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited