Bin
2025-12-16 9e0b2ba2c317b1a86212f24cbae3195ad1f3dbfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { LabelStudio, VideoView } from "@humansignal/frontend-test/helpers/LSF/index";
import { simpleVideoConfig } from "../../data/video_segmentation/regions";
import { FF_VIDEO_FRAME_SEEK_PRECISION } from "libs/editor/src/utils/feature-flags";
 
const simpleVideoData = { video: "/public/files/fps_24_frames_24_video.webm" };
 
describe("Video Frame Seeking", () => {
  beforeEach(() => {
    LabelStudio.addFeatureFlagsOnPageLoad({
      [FF_VIDEO_FRAME_SEEK_PRECISION]: true,
    });
  });
 
  it("Should be able to seek to a specific frame and see the correct frame without duplicating or skipping frames", () => {
    LabelStudio.params().config(simpleVideoConfig).data(simpleVideoData).withResult([]).init();
 
    LabelStudio.waitForObjectsReady();
 
    VideoView.captureVideoCanvas("video_canvas");
 
    VideoView.clickAtFrame(2);
 
    VideoView.videoCanvasShouldChange("video_canvas", 0);
 
    VideoView.captureVideoCanvas("video_canvas");
 
    VideoView.clickAtFrame(3);
 
    VideoView.videoCanvasShouldChange("video_canvas", 0);
 
    VideoView.captureVideoCanvas("video_canvas");
 
    VideoView.clickAtFrame(4);
 
    VideoView.videoCanvasShouldChange("video_canvas", 0);
  });
});