提交 531cb052 authored 作者: kongdywang's avatar kongdywang

fix ios play problem and widget progress error

上级 26d5bd06
......@@ -481,7 +481,7 @@ static const int CODE_ON_RECEIVE_FIRST_FRAME = 2003;
if (old && old != pixelBuffer) {
CFRelease(old);
}
if (_textureRegistry && _textureId && _textureId >= 0) {
if (!_isStoped && _textureRegistry && _textureId >= 0) {
[_textureRegistry textureFrameAvailable:_textureId];
}
}
......
......@@ -168,13 +168,13 @@ class SuperPlayerController {
_updatePlayerState(SuperPlayerState.END);
break;
case TXVodPlayEvent.PLAY_EVT_PLAY_PROGRESS:
dynamic progress = event[TXVodPlayEvent.EVT_PLAY_PROGRESS_MS];
dynamic duration = event[TXVodPlayEvent.EVT_PLAY_DURATION_MS];
dynamic progress = event[TXVodPlayEvent.EVT_PLAY_PROGRESS];
dynamic duration = event[TXVodPlayEvent.EVT_PLAY_DURATION];
if (null != progress) {
currentDuration = progress.toDouble()/1000; // Current time, converted unit: seconds
currentDuration = progress.toDouble(); // Current time, converted unit: seconds
}
if (null != duration) {
videoDuration = duration.toDouble()/1000; // Total playback time, converted unit: seconds
videoDuration = duration.toDouble(); // Total playback time, converted unit: seconds
}
if (videoDuration != 0) {
_observer?.onPlayProgress(currentDuration, videoDuration, await getPlayableDuration());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论