feat: release v0.0.1
This commit is contained in:
4
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.d.ts
vendored
Normal file
4
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import Player from "video.js/dist/types/player";
|
||||
declare function bigPlayPauseButtonPlugin(this: Player): void;
|
||||
export default bigPlayPauseButtonPlugin;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.d.ts.map
vendored
Normal file
1
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/video-player/components/video-js/plugins/big-play-pause-button/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAkBhD,iBAAS,wBAAwB,CAAC,IAAI,EAAE,MAAM,QAO7C;AAID,eAAe,wBAAwB,CAAC"}
|
||||
26
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.js
vendored
Normal file
26
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import videojs from "video.js";
|
||||
const BigPlayButton = videojs.getComponent("BigPlayButton");
|
||||
class BigPlayPauseButton extends BigPlayButton {
|
||||
handleClick(e) {
|
||||
const player = this.player();
|
||||
if (player.paused()) {
|
||||
player.play();
|
||||
}
|
||||
else {
|
||||
player.pause();
|
||||
}
|
||||
}
|
||||
}
|
||||
videojs.registerComponent("BigPlayPauseButton", BigPlayPauseButton);
|
||||
// Функция плагина с аннотацией типа this
|
||||
function bigPlayPauseButtonPlugin() {
|
||||
const player = this;
|
||||
const defaultButton = player.getChild("bigPlayButton");
|
||||
if (defaultButton) {
|
||||
defaultButton.dispose();
|
||||
}
|
||||
player.addChild("BigPlayPauseButton", {});
|
||||
}
|
||||
videojs.registerPlugin("bigPlayPauseButton", bigPlayPauseButtonPlugin);
|
||||
export default bigPlayPauseButtonPlugin;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.js.map
vendored
Normal file
1
dist/react/video-player/components/video-js/plugins/big-play-pause-button/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/react/video-player/components/video-js/plugins/big-play-pause-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,UAAU,CAAC;AAG/B,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;AAE5D,MAAM,kBAAmB,SAAQ,aAAa;IAC7C,WAAW,CAAC,CAAmB;QAC9B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,EAAY,CAAC;QAEvC,IAAI,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,EAAE,CAAC;QACf,CAAC;aAAM,CAAC;YACP,MAAM,CAAC,KAAK,EAAE,CAAC;QAChB,CAAC;IACF,CAAC;CACD;AAED,OAAO,CAAC,iBAAiB,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;AACpE,yCAAyC;AACzC,SAAS,wBAAwB;IAChC,MAAM,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvD,IAAI,aAAa,EAAE,CAAC;QACnB,aAAa,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IACD,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC;AAED,OAAO,CAAC,cAAc,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,CAAC;AAEvE,eAAe,wBAAwB,CAAC"}
|
||||
Reference in New Issue
Block a user