|
@@ -198,6 +198,11 @@ function handleTimeChange(value: number | number[]) {
|
|
function handleSilderMousedown() {
|
|
function handleSilderMousedown() {
|
|
timeController.isDrag = true
|
|
timeController.isDrag = true
|
|
}
|
|
}
|
|
|
|
+// 快进或者快退
|
|
|
|
+function speedCurrentTime(type: "fast" | "slow") {
|
|
|
|
+ handleTimeChange(timeController.currentTime + (type === "fast" ? 5 : -5))
|
|
|
|
+ showController()
|
|
|
|
+}
|
|
/* 播放控制器 */
|
|
/* 播放控制器 */
|
|
function handlePlay() {
|
|
function handlePlay() {
|
|
playController.type === "pause" ? playerVm.play() : playerVm.pause()
|
|
playController.type === "pause" ? playerVm.play() : playerVm.pause()
|
|
@@ -228,6 +233,10 @@ function handleVideoKeydown(e: KeyboardEvent) {
|
|
const key = e.key
|
|
const key = e.key
|
|
if (key === " ") {
|
|
if (key === " ") {
|
|
handlePlay()
|
|
handlePlay()
|
|
|
|
+ } else if (key === "ArrowLeft") {
|
|
|
|
+ speedCurrentTime("slow")
|
|
|
|
+ } else if (key === "ArrowRight") {
|
|
|
|
+ speedCurrentTime("fast")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function handleVideoMousemove() {
|
|
function handleVideoMousemove() {
|