play method
bool
play(
- String url, {
- StreamType? type,
- bool? hardWareDecode,
- bool? isStreamEncrypted,
override
播放。 url:拉流地址 type:流协议,可以写死。不同平台可能使用不同协议。一般安卓和ios用eh5,h5用的eh4 hardWareDecode:是否使用硬件编码,可以写死。没有可以不管 isStreamEncrypted:视频流是否为加密
Implementation
@override
bool play(String url, {StreamType? type, bool? hardWareDecode, bool? isStreamEncrypted}) {
log("play >>> url:$url, type:$type, hardWareDecode:$hardWareDecode");
_channel.invokeMethod(
"play", {"url": url, "type": type?.name, "hard": hardWareDecode, "isStreamEncrypted": isStreamEncrypted});
return true;
}