@editframe/elements 0.18.23-beta.0 → 0.18.27-beta.0
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/elements/EFMedia/AssetMediaEngine.d.ts +2 -1
- package/dist/elements/EFMedia/AssetMediaEngine.js +3 -0
- package/dist/elements/EFMedia/BaseMediaEngine.d.ts +9 -0
- package/dist/elements/EFMedia/BaseMediaEngine.js +27 -0
- package/dist/elements/EFMedia/JitMediaEngine.d.ts +1 -0
- package/dist/elements/EFMedia/JitMediaEngine.js +12 -0
- package/dist/elements/EFMedia/audioTasks/makeAudioBufferTask.js +11 -5
- package/dist/elements/EFMedia/shared/BufferUtils.d.ts +19 -18
- package/dist/elements/EFMedia/shared/BufferUtils.js +24 -44
- package/dist/elements/EFMedia/tasks/makeMediaEngineTask.browsertest.d.ts +8 -0
- package/dist/elements/EFMedia/tasks/makeMediaEngineTask.js +5 -5
- package/dist/elements/EFMedia/videoTasks/ScrubInputCache.d.ts +25 -0
- package/dist/elements/EFMedia/videoTasks/ScrubInputCache.js +42 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoBufferTask.d.ts +8 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoBufferTask.js +70 -0
- package/dist/elements/EFMedia/videoTasks/{makeVideoInitSegmentFetchTask.d.ts → makeScrubVideoInitSegmentFetchTask.d.ts} +1 -1
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoInitSegmentFetchTask.js +21 -0
- package/dist/elements/EFMedia/videoTasks/{makeVideoInputTask.d.ts → makeScrubVideoInputTask.d.ts} +1 -1
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoInputTask.js +27 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoSeekTask.d.ts +6 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoSeekTask.js +52 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoSegmentFetchTask.d.ts +4 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoSegmentFetchTask.js +23 -0
- package/dist/elements/EFMedia/videoTasks/makeScrubVideoSegmentIdTask.d.ts +4 -0
- package/dist/elements/EFMedia/videoTasks/{makeVideoSegmentIdTask.js → makeScrubVideoSegmentIdTask.js} +9 -4
- package/dist/elements/EFMedia/videoTasks/makeUnifiedVideoSeekTask.d.ts +6 -0
- package/dist/elements/EFMedia/videoTasks/makeUnifiedVideoSeekTask.js +112 -0
- package/dist/elements/EFMedia/videoTasks/makeVideoBufferTask.js +11 -5
- package/dist/elements/EFMedia.d.ts +0 -10
- package/dist/elements/EFMedia.js +1 -17
- package/dist/elements/EFVideo.d.ts +11 -9
- package/dist/elements/EFVideo.js +31 -23
- package/dist/gui/EFConfiguration.d.ts +1 -0
- package/dist/gui/EFConfiguration.js +5 -0
- package/dist/gui/EFFilmstrip.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/transcoding/types/index.d.ts +11 -0
- package/package.json +2 -2
- package/src/elements/EFCaptions.ts +1 -1
- package/src/elements/EFImage.ts +1 -1
- package/src/elements/EFMedia/AssetMediaEngine.ts +6 -0
- package/src/elements/EFMedia/BaseMediaEngine.ts +54 -0
- package/src/elements/EFMedia/JitMediaEngine.ts +18 -0
- package/src/elements/EFMedia/audioTasks/makeAudioBufferTask.browsertest.ts +185 -59
- package/src/elements/EFMedia/audioTasks/makeAudioBufferTask.ts +19 -6
- package/src/elements/EFMedia/shared/BufferUtils.ts +71 -85
- package/src/elements/EFMedia/tasks/makeMediaEngineTask.browsertest.ts +151 -112
- package/src/elements/EFMedia/tasks/makeMediaEngineTask.ts +12 -5
- package/src/elements/EFMedia/videoTasks/ScrubInputCache.ts +61 -0
- package/src/elements/EFMedia/videoTasks/makeScrubVideoBufferTask.ts +113 -0
- package/src/elements/EFMedia/videoTasks/{makeVideoInitSegmentFetchTask.ts → makeScrubVideoInitSegmentFetchTask.ts} +15 -3
- package/src/elements/EFMedia/videoTasks/{makeVideoInputTask.ts → makeScrubVideoInputTask.ts} +11 -10
- package/src/elements/EFMedia/videoTasks/makeScrubVideoSeekTask.ts +118 -0
- package/src/elements/EFMedia/videoTasks/makeScrubVideoSegmentFetchTask.ts +44 -0
- package/src/elements/EFMedia/videoTasks/{makeVideoSegmentIdTask.ts → makeScrubVideoSegmentIdTask.ts} +14 -6
- package/src/elements/EFMedia/videoTasks/makeUnifiedVideoSeekTask.ts +258 -0
- package/src/elements/EFMedia/videoTasks/makeVideoBufferTask.ts +19 -5
- package/src/elements/EFMedia.browsertest.ts +74 -11
- package/src/elements/EFMedia.ts +1 -23
- package/src/elements/EFVideo.browsertest.ts +204 -80
- package/src/elements/EFVideo.ts +38 -26
- package/src/elements/TargetController.browsertest.ts +1 -1
- package/src/gui/EFConfiguration.ts +4 -1
- package/src/gui/EFFilmstrip.ts +4 -4
- package/src/gui/EFFocusOverlay.ts +1 -1
- package/src/gui/EFPreview.ts +3 -4
- package/src/gui/EFScrubber.ts +1 -1
- package/src/gui/EFTimeDisplay.ts +1 -1
- package/src/gui/EFToggleLoop.ts +1 -1
- package/src/gui/EFTogglePlay.ts +1 -1
- package/src/gui/EFWorkbench.ts +1 -1
- package/src/transcoding/types/index.ts +16 -0
- package/test/__cache__/GET__api_v1_transcode_scrub_1_m4s_url_http_3A_2F_2Fweb_3A3000_2Fhead_moov_480p_mp4__6ff5127ebeda578a679474347fbd6137/data.bin +0 -0
- package/test/__cache__/GET__api_v1_transcode_scrub_1_m4s_url_http_3A_2F_2Fweb_3A3000_2Fhead_moov_480p_mp4__6ff5127ebeda578a679474347fbd6137/metadata.json +16 -0
- package/test/__cache__/GET__api_v1_transcode_scrub_init_m4s_url_http_3A_2F_2Fweb_3A3000_2Fhead_moov_480p_mp4__f6d4793fc9ff854ee9a738917fb64a53/data.bin +0 -0
- package/test/__cache__/GET__api_v1_transcode_scrub_init_m4s_url_http_3A_2F_2Fweb_3A3000_2Fhead_moov_480p_mp4__f6d4793fc9ff854ee9a738917fb64a53/metadata.json +16 -0
- package/test/cache-integration-verification.browsertest.ts +84 -0
- package/types.json +1 -1
- package/dist/elements/EFMedia/tasks/makeMediaEngineTask.test.d.ts +0 -1
- package/dist/elements/EFMedia/videoTasks/makeVideoBufferTask.browsertest.d.ts +0 -9
- package/dist/elements/EFMedia/videoTasks/makeVideoInitSegmentFetchTask.browsertest.d.ts +0 -9
- package/dist/elements/EFMedia/videoTasks/makeVideoInitSegmentFetchTask.js +0 -16
- package/dist/elements/EFMedia/videoTasks/makeVideoInputTask.browsertest.d.ts +0 -9
- package/dist/elements/EFMedia/videoTasks/makeVideoInputTask.js +0 -27
- package/dist/elements/EFMedia/videoTasks/makeVideoSeekTask.d.ts +0 -7
- package/dist/elements/EFMedia/videoTasks/makeVideoSeekTask.js +0 -34
- package/dist/elements/EFMedia/videoTasks/makeVideoSegmentFetchTask.browsertest.d.ts +0 -9
- package/dist/elements/EFMedia/videoTasks/makeVideoSegmentFetchTask.d.ts +0 -4
- package/dist/elements/EFMedia/videoTasks/makeVideoSegmentFetchTask.js +0 -28
- package/dist/elements/EFMedia/videoTasks/makeVideoSegmentIdTask.browsertest.d.ts +0 -9
- package/dist/elements/EFMedia/videoTasks/makeVideoSegmentIdTask.d.ts +0 -4
- package/src/elements/EFMedia/tasks/makeMediaEngineTask.test.ts +0 -233
- package/src/elements/EFMedia/videoTasks/makeVideoBufferTask.browsertest.ts +0 -555
- package/src/elements/EFMedia/videoTasks/makeVideoInitSegmentFetchTask.browsertest.ts +0 -59
- package/src/elements/EFMedia/videoTasks/makeVideoInputTask.browsertest.ts +0 -55
- package/src/elements/EFMedia/videoTasks/makeVideoSeekTask.ts +0 -65
- package/src/elements/EFMedia/videoTasks/makeVideoSegmentFetchTask.browsertest.ts +0 -57
- package/src/elements/EFMedia/videoTasks/makeVideoSegmentFetchTask.ts +0 -43
- package/src/elements/EFMedia/videoTasks/makeVideoSegmentIdTask.browsertest.ts +0 -56
|
@@ -681,7 +681,9 @@ describe("EFVideo", () => {
|
|
|
681
681
|
describe("AssetMediaEngine", () => {
|
|
682
682
|
test("seeks to 8074ms", async ({ barsNtone, barsNtoneTimegroup }) => {
|
|
683
683
|
// Wait for any initial loading to complete
|
|
684
|
-
await waitForTaskIgnoringAborts(
|
|
684
|
+
await waitForTaskIgnoringAborts(
|
|
685
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
686
|
+
);
|
|
685
687
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
686
688
|
|
|
687
689
|
// Use timegroup for seeking to ensure audio and video are synchronized
|
|
@@ -690,28 +692,36 @@ describe("EFVideo", () => {
|
|
|
690
692
|
|
|
691
693
|
// Wait for the new seek tasks to complete (ignoring any aborts from previous operations)
|
|
692
694
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
693
|
-
await waitForTaskIgnoringAborts(
|
|
695
|
+
await waitForTaskIgnoringAborts(
|
|
696
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
697
|
+
);
|
|
694
698
|
});
|
|
695
699
|
|
|
696
700
|
test("seeks to beginning of video (0ms)", async ({
|
|
697
701
|
barsNtone,
|
|
698
702
|
barsNtoneTimegroup,
|
|
699
703
|
}) => {
|
|
700
|
-
await waitForTaskIgnoringAborts(
|
|
704
|
+
await waitForTaskIgnoringAborts(
|
|
705
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
706
|
+
);
|
|
701
707
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
702
708
|
barsNtoneTimegroup.currentTimeMs = 0;
|
|
703
709
|
await barsNtone.updateComplete;
|
|
704
710
|
|
|
705
711
|
// Wait for the new seek tasks to complete
|
|
706
712
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
707
|
-
await waitForTaskIgnoringAborts(
|
|
713
|
+
await waitForTaskIgnoringAborts(
|
|
714
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
715
|
+
);
|
|
708
716
|
});
|
|
709
717
|
|
|
710
718
|
test("seeks to exact segment boundary at 2066ms", async ({
|
|
711
719
|
barsNtone,
|
|
712
720
|
barsNtoneTimegroup,
|
|
713
721
|
}) => {
|
|
714
|
-
await waitForTaskIgnoringAborts(
|
|
722
|
+
await waitForTaskIgnoringAborts(
|
|
723
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
724
|
+
);
|
|
715
725
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
716
726
|
// This is approximately where segment 0 ends and segment 1 begins
|
|
717
727
|
barsNtoneTimegroup.currentTimeMs = 2066;
|
|
@@ -719,14 +729,18 @@ describe("EFVideo", () => {
|
|
|
719
729
|
|
|
720
730
|
// Wait for the new seek tasks to complete
|
|
721
731
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
722
|
-
await waitForTaskIgnoringAborts(
|
|
732
|
+
await waitForTaskIgnoringAborts(
|
|
733
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
734
|
+
);
|
|
723
735
|
});
|
|
724
736
|
|
|
725
737
|
test("seeks to exact segment boundary at 4033ms", async ({
|
|
726
738
|
barsNtone,
|
|
727
739
|
barsNtoneTimegroup,
|
|
728
740
|
}) => {
|
|
729
|
-
await waitForTaskIgnoringAborts(
|
|
741
|
+
await waitForTaskIgnoringAborts(
|
|
742
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
743
|
+
);
|
|
730
744
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
731
745
|
// This is approximately where segment 1 ends and segment 2 begins
|
|
732
746
|
barsNtoneTimegroup.currentTimeMs = 4033;
|
|
@@ -734,79 +748,103 @@ describe("EFVideo", () => {
|
|
|
734
748
|
|
|
735
749
|
// Wait for the new seek tasks to complete
|
|
736
750
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
737
|
-
await waitForTaskIgnoringAborts(
|
|
751
|
+
await waitForTaskIgnoringAborts(
|
|
752
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
753
|
+
);
|
|
738
754
|
});
|
|
739
755
|
|
|
740
756
|
test("seeks to exact segment boundary at 6066ms", async ({
|
|
741
757
|
barsNtone,
|
|
742
758
|
barsNtoneTimegroup,
|
|
743
759
|
}) => {
|
|
744
|
-
await waitForTaskIgnoringAborts(
|
|
760
|
+
await waitForTaskIgnoringAborts(
|
|
761
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
762
|
+
);
|
|
745
763
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
746
764
|
// Reset to 0 first to ensure clean state
|
|
747
765
|
barsNtoneTimegroup.currentTimeMs = 0;
|
|
748
766
|
await barsNtone.updateComplete;
|
|
749
767
|
// Wait for both audio and video to complete the reset
|
|
750
768
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
751
|
-
await waitForTaskIgnoringAborts(
|
|
769
|
+
await waitForTaskIgnoringAborts(
|
|
770
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
771
|
+
);
|
|
752
772
|
|
|
753
773
|
// Updated: Use time safely within segment boundaries (6000ms instead of 6066ms)
|
|
754
774
|
// The actual boundary is at 6066.67ms, so 6000ms should be in segment 2
|
|
755
775
|
barsNtoneTimegroup.currentTimeMs = 6000;
|
|
756
776
|
await barsNtone.updateComplete;
|
|
757
777
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
758
|
-
await waitForTaskIgnoringAborts(
|
|
778
|
+
await waitForTaskIgnoringAborts(
|
|
779
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
780
|
+
);
|
|
759
781
|
});
|
|
760
782
|
|
|
761
783
|
test("seeks to exact segment boundary at 8033ms", async ({
|
|
762
784
|
barsNtone,
|
|
763
785
|
barsNtoneTimegroup,
|
|
764
786
|
}) => {
|
|
765
|
-
await waitForTaskIgnoringAborts(
|
|
787
|
+
await waitForTaskIgnoringAborts(
|
|
788
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
789
|
+
);
|
|
766
790
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
767
791
|
// This is approximately where segment 2 ends and segment 3 begins
|
|
768
792
|
barsNtoneTimegroup.currentTimeMs = 8033;
|
|
769
793
|
await barsNtone.updateComplete;
|
|
770
794
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
771
|
-
await waitForTaskIgnoringAborts(
|
|
795
|
+
await waitForTaskIgnoringAborts(
|
|
796
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
797
|
+
);
|
|
772
798
|
});
|
|
773
799
|
|
|
774
800
|
test("seeks to near end of video at 9900ms", async ({
|
|
775
801
|
barsNtone,
|
|
776
802
|
barsNtoneTimegroup,
|
|
777
803
|
}) => {
|
|
778
|
-
await waitForTaskIgnoringAborts(
|
|
804
|
+
await waitForTaskIgnoringAborts(
|
|
805
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
806
|
+
);
|
|
779
807
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
780
808
|
// Seek to near the end of the video
|
|
781
809
|
barsNtoneTimegroup.currentTimeMs = 9900;
|
|
782
810
|
await barsNtone.updateComplete;
|
|
783
811
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
784
|
-
await waitForTaskIgnoringAborts(
|
|
812
|
+
await waitForTaskIgnoringAborts(
|
|
813
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
814
|
+
);
|
|
785
815
|
});
|
|
786
816
|
|
|
787
817
|
test("seeks backwards from 8000ms to 2000ms", async ({
|
|
788
818
|
barsNtone,
|
|
789
819
|
barsNtoneTimegroup,
|
|
790
820
|
}) => {
|
|
791
|
-
await waitForTaskIgnoringAborts(
|
|
821
|
+
await waitForTaskIgnoringAborts(
|
|
822
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
823
|
+
);
|
|
792
824
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
793
825
|
// First seek forward
|
|
794
826
|
barsNtoneTimegroup.currentTimeMs = 8000;
|
|
795
827
|
await barsNtone.updateComplete;
|
|
796
|
-
await waitForTaskIgnoringAborts(
|
|
828
|
+
await waitForTaskIgnoringAborts(
|
|
829
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
830
|
+
);
|
|
797
831
|
|
|
798
832
|
// Then seek backward
|
|
799
833
|
barsNtoneTimegroup.currentTimeMs = 2000;
|
|
800
834
|
await barsNtone.updateComplete;
|
|
801
835
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
802
|
-
await waitForTaskIgnoringAborts(
|
|
836
|
+
await waitForTaskIgnoringAborts(
|
|
837
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
838
|
+
);
|
|
803
839
|
});
|
|
804
840
|
|
|
805
841
|
test("seeks to multiple points across segments", async ({
|
|
806
842
|
barsNtone,
|
|
807
843
|
barsNtoneTimegroup,
|
|
808
844
|
}) => {
|
|
809
|
-
await waitForTaskIgnoringAborts(
|
|
845
|
+
await waitForTaskIgnoringAborts(
|
|
846
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
847
|
+
);
|
|
810
848
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
811
849
|
|
|
812
850
|
// Use seek points that are within the actual media duration
|
|
@@ -817,7 +855,9 @@ describe("EFVideo", () => {
|
|
|
817
855
|
barsNtoneTimegroup.currentTimeMs = seekPoint;
|
|
818
856
|
await barsNtone.updateComplete;
|
|
819
857
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
820
|
-
await waitForTaskIgnoringAborts(
|
|
858
|
+
await waitForTaskIgnoringAborts(
|
|
859
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
860
|
+
);
|
|
821
861
|
}
|
|
822
862
|
});
|
|
823
863
|
|
|
@@ -825,33 +865,43 @@ describe("EFVideo", () => {
|
|
|
825
865
|
barsNtone,
|
|
826
866
|
barsNtoneTimegroup,
|
|
827
867
|
}) => {
|
|
828
|
-
await waitForTaskIgnoringAborts(
|
|
868
|
+
await waitForTaskIgnoringAborts(
|
|
869
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
870
|
+
);
|
|
829
871
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
830
872
|
// Use a safe seek time within the media duration
|
|
831
873
|
barsNtoneTimegroup.currentTimeMs = 8030;
|
|
832
874
|
await barsNtone.updateComplete;
|
|
833
875
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
834
|
-
await waitForTaskIgnoringAborts(
|
|
876
|
+
await waitForTaskIgnoringAborts(
|
|
877
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
878
|
+
);
|
|
835
879
|
});
|
|
836
880
|
|
|
837
881
|
test("seeks just after segment boundary at 8070ms", async ({
|
|
838
882
|
barsNtone,
|
|
839
883
|
barsNtoneTimegroup,
|
|
840
884
|
}) => {
|
|
841
|
-
await waitForTaskIgnoringAborts(
|
|
885
|
+
await waitForTaskIgnoringAborts(
|
|
886
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
887
|
+
);
|
|
842
888
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
843
889
|
// Use a safe seek time within the media duration
|
|
844
890
|
barsNtoneTimegroup.currentTimeMs = 8070;
|
|
845
891
|
await barsNtone.updateComplete;
|
|
846
892
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
847
|
-
await waitForTaskIgnoringAborts(
|
|
893
|
+
await waitForTaskIgnoringAborts(
|
|
894
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
895
|
+
);
|
|
848
896
|
});
|
|
849
897
|
|
|
850
898
|
test("handles rapid scrubbing between segments", async ({
|
|
851
899
|
barsNtone,
|
|
852
900
|
barsNtoneTimegroup,
|
|
853
901
|
}) => {
|
|
854
|
-
await waitForTaskIgnoringAborts(
|
|
902
|
+
await waitForTaskIgnoringAborts(
|
|
903
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
904
|
+
);
|
|
855
905
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
856
906
|
|
|
857
907
|
// Simulate rapid scrubbing back and forth across segments
|
|
@@ -875,7 +925,9 @@ describe("EFVideo", () => {
|
|
|
875
925
|
|
|
876
926
|
// Final seek operations should complete without errors
|
|
877
927
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
878
|
-
await waitForTaskIgnoringAborts(
|
|
928
|
+
await waitForTaskIgnoringAborts(
|
|
929
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
930
|
+
);
|
|
879
931
|
});
|
|
880
932
|
|
|
881
933
|
test("handles concurrent seeks to different segments", async ({
|
|
@@ -883,7 +935,9 @@ describe("EFVideo", () => {
|
|
|
883
935
|
barsNtone,
|
|
884
936
|
barsNtoneTimegroup,
|
|
885
937
|
}) => {
|
|
886
|
-
await waitForTaskIgnoringAborts(
|
|
938
|
+
await waitForTaskIgnoringAborts(
|
|
939
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
940
|
+
);
|
|
887
941
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
888
942
|
|
|
889
943
|
// Start multiple seeks without waiting for completion
|
|
@@ -895,7 +949,7 @@ describe("EFVideo", () => {
|
|
|
895
949
|
seekPromises.push(
|
|
896
950
|
Promise.allSettled([
|
|
897
951
|
barsNtone.audioSeekTask.taskComplete,
|
|
898
|
-
barsNtone.
|
|
952
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
899
953
|
]),
|
|
900
954
|
);
|
|
901
955
|
|
|
@@ -905,7 +959,7 @@ describe("EFVideo", () => {
|
|
|
905
959
|
seekPromises.push(
|
|
906
960
|
Promise.allSettled([
|
|
907
961
|
barsNtone.audioSeekTask.taskComplete,
|
|
908
|
-
barsNtone.
|
|
962
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
909
963
|
]),
|
|
910
964
|
);
|
|
911
965
|
|
|
@@ -915,7 +969,7 @@ describe("EFVideo", () => {
|
|
|
915
969
|
seekPromises.push(
|
|
916
970
|
Promise.allSettled([
|
|
917
971
|
barsNtone.audioSeekTask.taskComplete,
|
|
918
|
-
barsNtone.
|
|
972
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
919
973
|
]),
|
|
920
974
|
);
|
|
921
975
|
|
|
@@ -932,7 +986,9 @@ describe("EFVideo", () => {
|
|
|
932
986
|
barsNtone,
|
|
933
987
|
barsNtoneTimegroup,
|
|
934
988
|
}) => {
|
|
935
|
-
await waitForTaskIgnoringAborts(
|
|
989
|
+
await waitForTaskIgnoringAborts(
|
|
990
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
991
|
+
);
|
|
936
992
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
937
993
|
|
|
938
994
|
// Try to reproduce the exact error scenario
|
|
@@ -947,7 +1003,9 @@ describe("EFVideo", () => {
|
|
|
947
1003
|
|
|
948
1004
|
// The system should recover and eventually succeed
|
|
949
1005
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
950
|
-
await waitForTaskIgnoringAborts(
|
|
1006
|
+
await waitForTaskIgnoringAborts(
|
|
1007
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
1008
|
+
);
|
|
951
1009
|
});
|
|
952
1010
|
|
|
953
1011
|
test("seeks to 7975ms", async ({
|
|
@@ -958,7 +1016,6 @@ describe("EFVideo", () => {
|
|
|
958
1016
|
await barsNtoneTimegroup.frameTask.taskComplete;
|
|
959
1017
|
barsNtoneTimegroup.currentTimeMs = 7975;
|
|
960
1018
|
await barsNtoneTimegroup.waitForNestedUpdates();
|
|
961
|
-
await barsNtone.videoSegmentIdTask.run();
|
|
962
1019
|
console.log(
|
|
963
1020
|
"barsNtoneTimegroup.currentTime",
|
|
964
1021
|
barsNtoneTimegroup.currentTime,
|
|
@@ -970,11 +1027,13 @@ describe("EFVideo", () => {
|
|
|
970
1027
|
);
|
|
971
1028
|
console.log("barsNtone.desiredSeekTimeMs", barsNtone.desiredSeekTimeMs);
|
|
972
1029
|
console.log(
|
|
973
|
-
"barsNtone.
|
|
974
|
-
barsNtone.
|
|
1030
|
+
"barsNtone.unifiedVideoSeekResult",
|
|
1031
|
+
barsNtone.unifiedVideoSeekTask.value,
|
|
975
1032
|
);
|
|
976
1033
|
await barsNtoneTimegroup.frameTask.taskComplete;
|
|
977
|
-
expect(barsNtone.
|
|
1034
|
+
expect(barsNtone.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1035
|
+
8.033,
|
|
1036
|
+
);
|
|
978
1037
|
});
|
|
979
1038
|
|
|
980
1039
|
test("seeks to 8041.667ms in video track 1", async ({
|
|
@@ -985,14 +1044,16 @@ describe("EFVideo", () => {
|
|
|
985
1044
|
await barsNtoneTimegroup.frameTask.taskComplete;
|
|
986
1045
|
barsNtoneTimegroup.currentTimeMs = 8041.667;
|
|
987
1046
|
await barsNtoneTimegroup.seekTask.taskComplete;
|
|
988
|
-
expect(barsNtone.
|
|
1047
|
+
expect(barsNtone.unifiedVideoSeekTask.value?.timestamp).toBe(8.1);
|
|
989
1048
|
});
|
|
990
1049
|
|
|
991
1050
|
test("seeks to 10000ms near end of file", async ({
|
|
992
1051
|
barsNtone,
|
|
993
1052
|
barsNtoneTimegroup,
|
|
994
1053
|
}) => {
|
|
995
|
-
await waitForTaskIgnoringAborts(
|
|
1054
|
+
await waitForTaskIgnoringAborts(
|
|
1055
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
1056
|
+
);
|
|
996
1057
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
997
1058
|
|
|
998
1059
|
// Use a safe seek time within the media duration
|
|
@@ -1001,7 +1062,9 @@ describe("EFVideo", () => {
|
|
|
1001
1062
|
await barsNtone.updateComplete;
|
|
1002
1063
|
|
|
1003
1064
|
// Should not throw "Sample not found" errors
|
|
1004
|
-
await waitForTaskIgnoringAborts(
|
|
1065
|
+
await waitForTaskIgnoringAborts(
|
|
1066
|
+
barsNtone.unifiedVideoSeekTask.taskComplete,
|
|
1067
|
+
);
|
|
1005
1068
|
await waitForTaskIgnoringAborts(barsNtone.audioSeekTask.taskComplete);
|
|
1006
1069
|
});
|
|
1007
1070
|
});
|
|
@@ -1012,64 +1075,82 @@ describe("EFVideo", () => {
|
|
|
1012
1075
|
headMoov480p,
|
|
1013
1076
|
expect,
|
|
1014
1077
|
}) => {
|
|
1015
|
-
await waitForTaskIgnoringAborts(
|
|
1078
|
+
await waitForTaskIgnoringAborts(
|
|
1079
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1080
|
+
);
|
|
1016
1081
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1017
1082
|
|
|
1018
1083
|
timegroup.currentTimeMs = 0;
|
|
1019
1084
|
await timegroup.seekTask.taskComplete;
|
|
1020
1085
|
|
|
1021
|
-
expect(headMoov480p.
|
|
1086
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(0);
|
|
1022
1087
|
});
|
|
1023
1088
|
|
|
1024
1089
|
test("seeks to 1000ms", async ({ timegroup, headMoov480p, expect }) => {
|
|
1025
|
-
await waitForTaskIgnoringAborts(
|
|
1090
|
+
await waitForTaskIgnoringAborts(
|
|
1091
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1092
|
+
);
|
|
1026
1093
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1027
1094
|
|
|
1028
1095
|
timegroup.currentTimeMs = 1000;
|
|
1029
1096
|
await timegroup.seekTask.taskComplete;
|
|
1030
1097
|
|
|
1031
|
-
expect(headMoov480p.
|
|
1098
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(1);
|
|
1032
1099
|
});
|
|
1033
1100
|
|
|
1034
1101
|
test("seeks to 3000ms", async ({ timegroup, headMoov480p, expect }) => {
|
|
1035
|
-
await waitForTaskIgnoringAborts(
|
|
1102
|
+
await waitForTaskIgnoringAborts(
|
|
1103
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1104
|
+
);
|
|
1036
1105
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1037
1106
|
|
|
1038
1107
|
timegroup.currentTimeMs = 3000;
|
|
1039
1108
|
await timegroup.seekTask.taskComplete;
|
|
1040
1109
|
|
|
1041
|
-
expect(headMoov480p.
|
|
1110
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(3);
|
|
1042
1111
|
});
|
|
1043
1112
|
|
|
1044
1113
|
test("seeks to 5000ms", async ({ timegroup, headMoov480p, expect }) => {
|
|
1045
|
-
await waitForTaskIgnoringAborts(
|
|
1114
|
+
await waitForTaskIgnoringAborts(
|
|
1115
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1116
|
+
);
|
|
1046
1117
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1047
1118
|
|
|
1048
1119
|
timegroup.currentTimeMs = 5000;
|
|
1049
1120
|
await timegroup.seekTask.taskComplete;
|
|
1050
1121
|
|
|
1051
|
-
expect(headMoov480p.
|
|
1122
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(5);
|
|
1052
1123
|
});
|
|
1053
1124
|
|
|
1054
1125
|
test("seeks to 7500ms", async ({ timegroup, headMoov480p, expect }) => {
|
|
1055
|
-
await waitForTaskIgnoringAborts(
|
|
1126
|
+
await waitForTaskIgnoringAborts(
|
|
1127
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1128
|
+
);
|
|
1056
1129
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1057
1130
|
|
|
1058
1131
|
timegroup.currentTimeMs = 7500;
|
|
1059
1132
|
await timegroup.seekTask.taskComplete;
|
|
1060
1133
|
|
|
1061
1134
|
// JIT transcoding returns actual video frame timestamps, not idealized segment boundaries
|
|
1062
|
-
expect(headMoov480p.
|
|
1135
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1136
|
+
7.5,
|
|
1137
|
+
1,
|
|
1138
|
+
);
|
|
1063
1139
|
});
|
|
1064
1140
|
|
|
1065
1141
|
test("seeks to 8500ms", async ({ timegroup, headMoov480p, expect }) => {
|
|
1066
|
-
await waitForTaskIgnoringAborts(
|
|
1142
|
+
await waitForTaskIgnoringAborts(
|
|
1143
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1144
|
+
);
|
|
1067
1145
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1068
1146
|
|
|
1069
1147
|
timegroup.currentTimeMs = 8500;
|
|
1070
1148
|
await timegroup.seekTask.taskComplete;
|
|
1071
1149
|
|
|
1072
|
-
expect(headMoov480p.
|
|
1150
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1151
|
+
8.5,
|
|
1152
|
+
1,
|
|
1153
|
+
);
|
|
1073
1154
|
});
|
|
1074
1155
|
|
|
1075
1156
|
test("seeks to near end at 9000ms", async ({
|
|
@@ -1077,13 +1158,15 @@ describe("EFVideo", () => {
|
|
|
1077
1158
|
headMoov480p,
|
|
1078
1159
|
expect,
|
|
1079
1160
|
}) => {
|
|
1080
|
-
await waitForTaskIgnoringAborts(
|
|
1161
|
+
await waitForTaskIgnoringAborts(
|
|
1162
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1163
|
+
);
|
|
1081
1164
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1082
1165
|
|
|
1083
1166
|
timegroup.currentTimeMs = 9000;
|
|
1084
1167
|
await timegroup.seekTask.taskComplete;
|
|
1085
1168
|
|
|
1086
|
-
expect(headMoov480p.
|
|
1169
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(9);
|
|
1087
1170
|
});
|
|
1088
1171
|
|
|
1089
1172
|
test("seeks backward from 7000ms to 2000ms", async ({
|
|
@@ -1091,20 +1174,32 @@ describe("EFVideo", () => {
|
|
|
1091
1174
|
headMoov480p,
|
|
1092
1175
|
expect,
|
|
1093
1176
|
}) => {
|
|
1094
|
-
await waitForTaskIgnoringAborts(
|
|
1177
|
+
await waitForTaskIgnoringAborts(
|
|
1178
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1179
|
+
);
|
|
1095
1180
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1096
1181
|
|
|
1097
1182
|
// First seek forward
|
|
1098
1183
|
timegroup.currentTimeMs = 7000;
|
|
1099
1184
|
await timegroup.seekTask.taskComplete;
|
|
1100
|
-
await waitForTaskIgnoringAborts(
|
|
1101
|
-
|
|
1185
|
+
await waitForTaskIgnoringAborts(
|
|
1186
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1187
|
+
);
|
|
1188
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1189
|
+
7,
|
|
1190
|
+
1,
|
|
1191
|
+
);
|
|
1102
1192
|
|
|
1103
1193
|
// Then seek backward
|
|
1104
1194
|
timegroup.currentTimeMs = 2000;
|
|
1105
1195
|
await timegroup.seekTask.taskComplete;
|
|
1106
|
-
await waitForTaskIgnoringAborts(
|
|
1107
|
-
|
|
1196
|
+
await waitForTaskIgnoringAborts(
|
|
1197
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1198
|
+
);
|
|
1199
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1200
|
+
2,
|
|
1201
|
+
1,
|
|
1202
|
+
);
|
|
1108
1203
|
});
|
|
1109
1204
|
|
|
1110
1205
|
test("seeks to multiple points in sequence", async ({
|
|
@@ -1112,7 +1207,9 @@ describe("EFVideo", () => {
|
|
|
1112
1207
|
headMoov480p,
|
|
1113
1208
|
expect,
|
|
1114
1209
|
}) => {
|
|
1115
|
-
await waitForTaskIgnoringAborts(
|
|
1210
|
+
await waitForTaskIgnoringAborts(
|
|
1211
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1212
|
+
);
|
|
1116
1213
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1117
1214
|
|
|
1118
1215
|
const seekPoints = [1000, 3000, 5000, 2000, 6000, 0];
|
|
@@ -1122,9 +1219,9 @@ describe("EFVideo", () => {
|
|
|
1122
1219
|
timegroup.currentTimeMs = seekPoints[i]!;
|
|
1123
1220
|
await timegroup.seekTask.taskComplete;
|
|
1124
1221
|
await waitForTaskIgnoringAborts(
|
|
1125
|
-
headMoov480p.
|
|
1222
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1126
1223
|
);
|
|
1127
|
-
expect(headMoov480p.
|
|
1224
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1128
1225
|
expectedTimestamps[i]!,
|
|
1129
1226
|
1,
|
|
1130
1227
|
);
|
|
@@ -1136,7 +1233,9 @@ describe("EFVideo", () => {
|
|
|
1136
1233
|
headMoov480p,
|
|
1137
1234
|
expect,
|
|
1138
1235
|
}) => {
|
|
1139
|
-
await waitForTaskIgnoringAborts(
|
|
1236
|
+
await waitForTaskIgnoringAborts(
|
|
1237
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1238
|
+
);
|
|
1140
1239
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1141
1240
|
|
|
1142
1241
|
const fractionalTimes = [1234.567, 3456.789, 5678.901];
|
|
@@ -1146,9 +1245,9 @@ describe("EFVideo", () => {
|
|
|
1146
1245
|
timegroup.currentTimeMs = fractionalTimes[i]!;
|
|
1147
1246
|
await timegroup.seekTask.taskComplete;
|
|
1148
1247
|
await waitForTaskIgnoringAborts(
|
|
1149
|
-
headMoov480p.
|
|
1248
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1150
1249
|
);
|
|
1151
|
-
expect(headMoov480p.
|
|
1250
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1152
1251
|
expectedTimestamps[i]!,
|
|
1153
1252
|
1,
|
|
1154
1253
|
); // Reduced precision for JIT
|
|
@@ -1161,18 +1260,33 @@ describe("EFVideo", () => {
|
|
|
1161
1260
|
expect,
|
|
1162
1261
|
}) => {
|
|
1163
1262
|
await timegroup.seekTask.taskComplete;
|
|
1164
|
-
await waitForTaskIgnoringAborts(
|
|
1165
|
-
|
|
1263
|
+
await waitForTaskIgnoringAborts(
|
|
1264
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1265
|
+
);
|
|
1266
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1267
|
+
0,
|
|
1268
|
+
1,
|
|
1269
|
+
);
|
|
1166
1270
|
|
|
1167
1271
|
timegroup.currentTimeMs = 1000;
|
|
1168
1272
|
await timegroup.seekTask.taskComplete;
|
|
1169
|
-
await waitForTaskIgnoringAborts(
|
|
1170
|
-
|
|
1273
|
+
await waitForTaskIgnoringAborts(
|
|
1274
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1275
|
+
);
|
|
1276
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1277
|
+
1,
|
|
1278
|
+
1,
|
|
1279
|
+
);
|
|
1171
1280
|
|
|
1172
1281
|
timegroup.currentTimeMs = 4000;
|
|
1173
1282
|
await timegroup.seekTask.taskComplete;
|
|
1174
|
-
await waitForTaskIgnoringAborts(
|
|
1175
|
-
|
|
1283
|
+
await waitForTaskIgnoringAborts(
|
|
1284
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1285
|
+
);
|
|
1286
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBeCloseTo(
|
|
1287
|
+
4,
|
|
1288
|
+
1,
|
|
1289
|
+
);
|
|
1176
1290
|
});
|
|
1177
1291
|
|
|
1178
1292
|
test("rapid succession seeks cause intermediate seeks to be skipped", async ({
|
|
@@ -1183,7 +1297,7 @@ describe("EFVideo", () => {
|
|
|
1183
1297
|
await timegroup.waitForMediaDurations();
|
|
1184
1298
|
timegroup.currentTimeMs = 1000;
|
|
1185
1299
|
await timegroup.seekTask.taskComplete;
|
|
1186
|
-
expect(headMoov480p.
|
|
1300
|
+
expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(1);
|
|
1187
1301
|
|
|
1188
1302
|
// // Track frameTask executions using a spy on the run method
|
|
1189
1303
|
// const runSpy = vi.spyOn(timegroup.frameTask, 'run');
|
|
@@ -1199,7 +1313,7 @@ describe("EFVideo", () => {
|
|
|
1199
1313
|
// timegroup.currentTimeMs = 8000;
|
|
1200
1314
|
|
|
1201
1315
|
// await timegroup.seekTask.taskComplete;
|
|
1202
|
-
// expect(headMoov480p.
|
|
1316
|
+
// expect(headMoov480p.unifiedVideoSeekTask.value?.timestamp).toBe(8);
|
|
1203
1317
|
// expect(runSpy).toHaveBeenCalledTimes(3);
|
|
1204
1318
|
});
|
|
1205
1319
|
});
|
|
@@ -1216,9 +1330,9 @@ describe("EFVideo", () => {
|
|
|
1216
1330
|
const video2 = videos[1]!;
|
|
1217
1331
|
|
|
1218
1332
|
// Wait for initial loading
|
|
1219
|
-
await waitForTaskIgnoringAborts(video1.
|
|
1333
|
+
await waitForTaskIgnoringAborts(video1.unifiedVideoSeekTask.taskComplete);
|
|
1220
1334
|
await waitForTaskIgnoringAborts(video1.audioSeekTask.taskComplete);
|
|
1221
|
-
await waitForTaskIgnoringAborts(video2.
|
|
1335
|
+
await waitForTaskIgnoringAborts(video2.unifiedVideoSeekTask.taskComplete);
|
|
1222
1336
|
await waitForTaskIgnoringAborts(video2.audioSeekTask.taskComplete);
|
|
1223
1337
|
|
|
1224
1338
|
// Get the duration of the first video to know where the second video starts
|
|
@@ -1241,7 +1355,9 @@ describe("EFVideo", () => {
|
|
|
1241
1355
|
const timegroup = headMoov480p.closest("ef-timegroup") as EFTimegroup;
|
|
1242
1356
|
|
|
1243
1357
|
// Wait for initial loading to complete
|
|
1244
|
-
await waitForTaskIgnoringAborts(
|
|
1358
|
+
await waitForTaskIgnoringAborts(
|
|
1359
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1360
|
+
);
|
|
1245
1361
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1246
1362
|
|
|
1247
1363
|
// The fix: JitMediaEngine.computeSegmentId should handle seeking to exact duration
|
|
@@ -1260,7 +1376,7 @@ describe("EFVideo", () => {
|
|
|
1260
1376
|
|
|
1261
1377
|
// This should now work without throwing "Segment ID is not available"
|
|
1262
1378
|
await waitForTaskIgnoringAborts(
|
|
1263
|
-
headMoov480p.
|
|
1379
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1264
1380
|
);
|
|
1265
1381
|
await waitForTaskIgnoringAborts(
|
|
1266
1382
|
headMoov480p.audioSeekTask.taskComplete,
|
|
@@ -1275,7 +1391,9 @@ describe("EFVideo", () => {
|
|
|
1275
1391
|
const timegroup = headMoov480p.closest("ef-timegroup") as EFTimegroup;
|
|
1276
1392
|
|
|
1277
1393
|
// Wait for initial loading to complete
|
|
1278
|
-
await waitForTaskIgnoringAborts(
|
|
1394
|
+
await waitForTaskIgnoringAborts(
|
|
1395
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1396
|
+
);
|
|
1279
1397
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1280
1398
|
|
|
1281
1399
|
console.log("🧪 TESTING: Audio analysis out-of-bounds time range fix");
|
|
@@ -1298,7 +1416,9 @@ describe("EFVideo", () => {
|
|
|
1298
1416
|
// Let the audio analysis tasks run - they should now handle this gracefully
|
|
1299
1417
|
|
|
1300
1418
|
// The basic seek should complete without errors
|
|
1301
|
-
await waitForTaskIgnoringAborts(
|
|
1419
|
+
await waitForTaskIgnoringAborts(
|
|
1420
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1421
|
+
);
|
|
1302
1422
|
|
|
1303
1423
|
// Audio tasks may still throw their own errors, but not the "No segments found" error
|
|
1304
1424
|
// We don't explicitly test the audio analysis tasks here since they might legitimately
|
|
@@ -1314,7 +1434,9 @@ describe("EFVideo", () => {
|
|
|
1314
1434
|
const timegroup = headMoov480p.closest("ef-timegroup") as EFTimegroup;
|
|
1315
1435
|
|
|
1316
1436
|
// Wait for initial loading to complete
|
|
1317
|
-
await waitForTaskIgnoringAborts(
|
|
1437
|
+
await waitForTaskIgnoringAborts(
|
|
1438
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1439
|
+
);
|
|
1318
1440
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|
|
1319
1441
|
|
|
1320
1442
|
console.log("🧪 TESTING: Rapid seeking race condition fix");
|
|
@@ -1337,7 +1459,9 @@ describe("EFVideo", () => {
|
|
|
1337
1459
|
}
|
|
1338
1460
|
|
|
1339
1461
|
// The fix should prevent errors - both video and audio tasks should complete
|
|
1340
|
-
await waitForTaskIgnoringAborts(
|
|
1462
|
+
await waitForTaskIgnoringAborts(
|
|
1463
|
+
headMoov480p.unifiedVideoSeekTask.taskComplete,
|
|
1464
|
+
);
|
|
1341
1465
|
|
|
1342
1466
|
// Audio tasks should also complete without throwing, though they may log warnings
|
|
1343
1467
|
await waitForTaskIgnoringAborts(headMoov480p.audioSeekTask.taskComplete);
|