0.0.9 • Published 2 years ago

@tower1229/videojs-plugin-marker v0.0.9

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

videojs-plugin-marker

videojs 进度条打点插件。基于videojs-marker-plugin项目二次开发,支持 marker 点更新和 marker 点击事件;更换构建工具为 Vite。

preivew

videojs 系列项目

Install

npm i @tower1229/videojs-plugin-marker -S
import '@tower1229/videojs-plugin-marker';
import '@tower1229/videojs-plugin-marker/dist/style.css';

Use

const player = videojs(this.$refs.videoPlayer, options);

//  设置打点信息
player.markerPlugin({
  markers: [
    {
      offset: 2,
    },
  ],
});

// 更新打点信息
player.markerPlugin().updateOptions({
  markers: [
    {
      offset: 10,
      data: {
        content: "content2",
      },
      onClick(e) {
        e.stopPropagation(); // marker点击事件,可以屏蔽原进度条动作
        alert(`marker click!`);
      },
    },
  ],
});
0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago