play method
Load and play a video URL (mp4 / m3u8 / local file path).
headers optional HTTP headers forwarded to every network request
(playlist + segments). Useful when the CDN requires a specific
User-Agent or Referer. Header keys are case-sensitive; use the
canonical HTTP capitalisation, e.g. 'User-Agent', not 'user-agent'.
platform 内容平台标识(透传后端字段)。'huolong' 时 iOS 走火龙
(VVC/H.266) 转码引擎播放(明文转码→本地 HLS→AVPlayer,UI 与普通播放
一致,需 iOS 14+);其余值或 null 走原引擎决策。Android 暂未实现该路由。
Implementation
Future<void> play(String url,
{Map<String, String>? headers, String? platform}) =>
_invoke('play', {
'url': url,
if (headers != null) 'headers': headers,
if (platform != null && platform.isNotEmpty) 'platform': platform,
});