@give-tech/ec-player 0.0.1-beta.1 → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/dist/player/FLVPlayer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2555,7 +2555,7 @@ class FLVPlayer extends BasePlayer {
|
|
|
2555
2555
|
const isLive = this.config.isLive;
|
|
2556
2556
|
if (this._timedFrameBuffer.length > 0 && this.renderer) {
|
|
2557
2557
|
this.consecutiveEmptyBuffer = 0;
|
|
2558
|
-
if (this.
|
|
2558
|
+
if (this.playStartTime <= 0) {
|
|
2559
2559
|
this.firstFrameDts = this._timedFrameBuffer[0].dts;
|
|
2560
2560
|
this.playStartTime = now;
|
|
2561
2561
|
this.playStartTimeOffset = 0;
|
|
@@ -2810,24 +2810,22 @@ class FLVPlayer extends BasePlayer {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
let newCount = 0;
|
|
2812
2812
|
for (const tag of result.videoTags) {
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
break;
|
|
2822
|
-
}
|
|
2813
|
+
let annexBData = this.flvDemuxer.videoTagToAnnexB(tag, lengthSize);
|
|
2814
|
+
if (!annexBData) {
|
|
2815
|
+
for (const trySize of [4, 2, 1]) {
|
|
2816
|
+
if (trySize !== lengthSize) {
|
|
2817
|
+
annexBData = this.flvDemuxer.videoTagToAnnexB(tag, trySize);
|
|
2818
|
+
if (annexBData) {
|
|
2819
|
+
lengthSize = trySize;
|
|
2820
|
+
break;
|
|
2823
2821
|
}
|
|
2824
2822
|
}
|
|
2825
2823
|
}
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2824
|
+
}
|
|
2825
|
+
if (annexBData) {
|
|
2826
|
+
this._videoTagQueue.push({ tag, annexBData });
|
|
2827
|
+
this._lastQueuedTimestamp = tag.timestamp;
|
|
2828
|
+
newCount++;
|
|
2831
2829
|
}
|
|
2832
2830
|
}
|
|
2833
2831
|
if (newCount > 0) {
|