Implementation
Map<String, dynamic> get toMap => {
'logLevel': logLevel.index,
'webRTCConfig': webRTCConfig,
'wsSignalerAddr': wsSignalerAddr,
'announce': announce,
'diskCacheLimit': diskCacheLimit,
'memoryCacheLimit': memoryCacheLimit,
'memoryCacheCountLimit': memoryCacheCountLimit,
'p2pEnabled': p2pEnabled,
'downloadTimeout': downloadTimeout.inSeconds,
'dcDownloadTimeout': dcDownloadTimeout.inSeconds,
'tag': tag,
'localPort': localPort,
'maxPeerConnections': maxPeerConnections,
'useHttpRange': useHttpRange,
'wifiOnly': wifiOnly,
'httpHeaders': httpHeaders ?? {},
'isSetTopBox': isSetTopBox,
'httpLoadTime': httpLoadTime,
'sharePlaylist': sharePlaylist,
'logPersistent': logPersistent,
'logFilePath': logFilePathInIos,
'waitForPeer': waitForPeerInAndroid,
'waitForPeerTimeout': waitForPeerTimeoutInAndroid,
'hlsMediaFiles': hlsMediaFiles,
// new
'announceLocation': announceLocation?.index,
'hlsMediaFileExtensions': hlsMediaFileExtensions,
};