P2PSettingConfig class

Annotations
  • @JS()
  • @anonymous

Constructors

P2PSettingConfig.new({void getStats(int totalP2PDownloaded, int totalP2PUploaded, int totalHTTPDownloaded, int p2pDownloadSpeed)?, void getPeerId(int peerId)?, void getPeersInfo(int peers)?, String? channelId(int m3u8Url)?, dynamic segmentId(String streamId, int sn, String segmentUrl, String? range)?})
factory

Properties

announce String?
默认:https://tracker.cdnbye.com/v1' tracker服务器地址。
getter/setter pair
announceLocation String?
默认:cn' tracker服务器地址的国家代号,分为'cn'、'hk'、'us'。
getter/setter pair
geoIpPreflight bool?
默认:true 向在线IP数据库请求ASN等信息,从而获得更准确的调度,会延迟P2P启动时间。
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpLoadTime int?
默认:2.0 P2P下载超时后留给HTTP下载的时间。
getter/setter pair
live bool?
默认:true 设置直播或者点播模式,不同模式会自动设置不同的hls.js参数。
getter/setter pair
logLevel String?
默认:boolean 'error' log的等级,分为'warn'、'error'、'none',设为true等于'warn',设为false等于'none'。
getter/setter pair
memoryCacheLimit Object?
默认:{"pc": 800 * 1024 * 1024, "mobile": 500 * 1024 * 1024} p2p缓存的最大数据量,分为PC和mobile。
getter/setter pair
p2pEnabled bool?
默认:true 是否开启P2P。
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharePlaylist bool?
默认:false 是否允许m3u8文件的P2P传输。
getter/setter pair
token String?
默认:undefined token用于控制台多域名数据汇总展示,另外如果自定义channelId也需要设置token。
getter/setter pair
useHttpRange bool?
默认:true 在可能的情况下使用Http Range请求来补足p2p下载超时的剩余部分数据。
getter/setter pair
waitForPeer bool?
默认:false 优先尝试从对等端下载前几片数据,可以提高P2P比例,但可能会增加起播延时。
getter/setter pair
waitForPeerTimeout int?
默认:4.5 waitForPeer的超时时间(单位秒),超时后恢复从http下载。
getter/setter pair
webRTCConfig Object?
默认:{} 用于配置stun和datachannel的字典 (opens new window)。
getter/setter pair

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