class VeLivePlayerStreamData { bool? enableABR; bool? enableMainBackupSwitch; VeLivePlayerResolution? defaultResolution; VeLivePlayerFormat? defaultFormat; VeLivePlayerProtocol? defaultProtocol; List<VeLivePlayerStream>? mainStream; List<VeLivePlayerStream>? backupStream; VeLivePlayerStreamData({ this.enableABR, this.enableMainBackupSwitch, this.defaultResolution, this.defaultFormat, this.defaultProtocol, this.mainStream, this.backupStream, }); }
播放地址相关配置。
bool? enableABR;
是否开启自适应码率(Adaptive Bit-Rate,简称 ABR)功能。默认值为 false。取值如下:
true:开启;
false:关闭。
bool? enableMainBackupSwitch;
是否开启主备流功能。默认值为 false。取值如下:
true:开启;
false:关闭。
VeLivePlayerResolution? defaultResolution;
播放器的默认清晰度档位,默认使用原始流清晰度。详见 VeLivePlayerResolution。
VeLivePlayerFormat? defaultFormat;
播放器的默认播放格式,默认值为 FLV。详见 VeLivePlayerFormat。
VeLivePlayerProtocol? defaultProtocol;
播放器的默认播放传输层协议,默认值为 TCP。详见 VeLivePlayerProtocol。
List<VeLivePlayerStream>? mainStream;
主路流地址列表。详见 VeLivePlayerStream。
List<VeLivePlayerStream>? backupStream;
备路流地址列表。详见 VeLivePlayerStream。
class VeLivePlayerStream { String url; VeLivePlayerResolution? resolution; int? bitrate; VeLivePlayerProtocol? protocol; VeLivePlayerFormat? format; VeLivePlayerStreamType? type; VeLivePlayerStream({ required this.url, this.resolution, this.bitrate, this.protocol, this.format, this.type, }); }
流地址信息。
String url;
播放地址。
VeLivePlayerResolution? resolution;
清晰度档位,默认使用原始流清晰度。详见 VeLivePlayerResolution。
int? bitrate;
播放码率,单位为 kbps。
VeLivePlayerProtocol? protocol;
传输协议,默认值为 TCP。详见 VeLivePlayerProtocol。
VeLivePlayerFormat? format;
播放格式,默认值为 FLV。详见 VeLivePlayerFormat。
VeLivePlayerStreamType? type;
播放流类型为主路或备路,默认为主路流。详见 VeLivePlayerStreamType。
enum VeLivePlayerResolution { origin, uhd, hd, sd, ld, }
直播播放器的清晰度档位。
| 类型 | 值 | 说明 |
|---|---|---|
| origin | 0 | 原始流。 |
| uhd | 1 | UHD 超高清。 |
| hd | 2 | HD 高清。 |
| sd | 3 | SD 标清。 |
| ld | 4 | LD 低清。 |
enum VeLivePlayerFormat { flv, hls, rtm, }
直播播放格式。
| 类型 | 值 | 说明 |
|---|---|---|
| flv | 0 | FLV 格式。 |
| hls | 1 | HLS 格式。 |
| rtm | 2 | RTM 格式。 |
enum VeLivePlayerProtocol { tcp, quic, tls, }
直播播放传输协议。
| 类型 | 值 | 说明 |
|---|---|---|
| tcp | 0 | TCP 协议。 |
| quic | 1 | QUIC 协议。 |
| tls | 2 | TLS 协议。 |
enum VeLivePlayerStreamType { main, backup, }
直播播放流类型。
| 类型 | 值 | 说明 |
|---|---|---|
| main | 0 | 主路流。 |
| backup | 1 | 备路流。 |