如何更改进度控件中的当前时间?

How to change the current time in the progress control?

是否可以在时间轴上手动设置当前时间位置?我需要这个,因为我有几个独立的视频,它们代表一个视频并在不同的播放器中播放。

例如,实际当前时间被标记为白点,我想要显示的期望当前时间被标记为红点。

我可以在不创建全新的自定义控制栏的情况下以某种方式做到这一点吗?

Middleware 可能是解决方案的一部分,它允许您拦截和修改发送到播放技术(视频元素)/从播放技术(视频元素)接收的内容。

var myMiddleware = function(player) {
  return {
    currentTime: function(ct) {
      // When the video el says the currentTime is 60s, report 160s
      return ct + 100;
    },
    setCurrentTime: function(time) {
      // When the user / progress bar wants to seek to 220s, actually seek to 120s
      return time - 100; 
    }
  };
};

videojs.use('*', myMiddleware);