|
@@ -94,7 +94,8 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
fixAudioTimestampGap: false,
|
|
|
- autoCleanupSourceBuffer: true,
|
|
|
+ enableStashBuffer: true,
|
|
|
+ stashInitialSize: false,
|
|
|
}
|
|
|
);
|
|
|
this.flvPlayer.attachMediaElement(this.$refs.VideoMedia);
|
|
@@ -116,12 +117,15 @@ export default {
|
|
|
this.lastDecodedFrames = res.decodedFrames;
|
|
|
return;
|
|
|
}
|
|
|
- if (this.lastDecodedFrames !== res.decodedFrames) {
|
|
|
- this.lastDecodedFrames = res.decodedFrames;
|
|
|
- } else {
|
|
|
+ if (
|
|
|
+ this.lastDecodedFrames === res.decodedFrames &&
|
|
|
+ !this.flvPlayer.paused
|
|
|
+ ) {
|
|
|
this.lastDecodedFrames = 0;
|
|
|
console.log("卡住了,准备重试!");
|
|
|
this.retryPlay();
|
|
|
+ } else {
|
|
|
+ this.lastDecodedFrames = res.decodedFrames;
|
|
|
}
|
|
|
},
|
|
|
playError(errorType) {
|