startVodPlayWithParams method
Starting from version 10.7, the method "startPlayWithParams" has been changed to "startVodPlayWithParams" for playing videos using fileId.
To play the video successfully, you need to set the Licence using "SuperPlayerPlugin#setGlobalLicense" method before playing the video.
If you do not set the Licence, the video will not play (black screen). The Licence for live streaming,
short video, and video playback can all be used. If you have not obtained the Licence, you can apply for a free trial version here
(https://cloud.tencent.com/act/event/License) for normal playback. To use the official version, you need to purchase
(https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96.B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license).
通过fileId播放视频
10.7版本开始,startPlayWithParams变更为startVodPlayWithParams,需要通过 {@link SuperPlayerPlugin#setGlobalLicense} 设置 Licence 后方可成功播放,
否则将播放失败(黑屏),全局仅设置一次即可。直播 Licence、短视频 Licence 和视频播放 Licence 均可使用,若您暂未获取上述 Licence ,
可快速免费申请测试版 Licence 以正常播放,正式版 License 需购买
(https://cloud.tencent.com/document/product/881/74588#.E8.B4.AD.E4.B9.B0.E5.B9.B6.E6.96.B0.E5.BB.BA.E6.AD.A3.E5.BC.8F.E7.89.88-license)。
@params : seeTXPlayInfoParams return 是否播放成功 if play successful
Implementation
Future<void> startVodPlayWithParams(TXPlayInfoParams params) async {
if (_isNeedDisposed) return;
await _initPlayer.future;
_changeState(TXPlayerState.buffering);
printVersionInfo();
await _vodPlayerApi.startVodPlayWithParams(TXPlayInfoParamsPlayerMsg()
..playerId = _playerId
..appId = params.appId
..fileId = params.fileId
..psign = params.psign);
}