|
@@ -83,6 +83,7 @@ import { onMounted, onUnmounted, ref, reactive, watch, toRef, watchEffect } from
|
|
|
import { UUID } from "@/libs/tools"
|
|
|
import { formatTime } from "./tools"
|
|
|
import { NSlider } from "naive-ui"
|
|
|
+import { ElMessage } from "element-plus"
|
|
|
|
|
|
const props = defineProps<{
|
|
|
disableEvents?: boolean
|
|
@@ -248,9 +249,30 @@ function pauseVideo() {
|
|
|
showController()
|
|
|
}
|
|
|
// 循环播放
|
|
|
+let message: any = null
|
|
|
function handleLoop() {
|
|
|
playController.loop ? playerVm.loop(false) : playerVm.loop(true)
|
|
|
playController.loop = playerVm.loop()
|
|
|
+
|
|
|
+ if (playController.loop) {
|
|
|
+ if (message) {
|
|
|
+ message.close()
|
|
|
+ }
|
|
|
+ message = ElMessage({
|
|
|
+ message: "已打开循环播放",
|
|
|
+ icon: "",
|
|
|
+ customClass: "defaultMessage"
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ if (message) {
|
|
|
+ message.close()
|
|
|
+ }
|
|
|
+ message = ElMessage({
|
|
|
+ message: "已关闭循环播放",
|
|
|
+ icon: "",
|
|
|
+ customClass: "defaultMessage"
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
// 播放速度
|
|
|
function handlePalySpeedChange(value: number) {
|
|
@@ -332,7 +354,7 @@ defineExpose({
|
|
|
width: 100%;
|
|
|
left: 0;
|
|
|
bottom: 0;
|
|
|
- padding: 0 32px 22px;
|
|
|
+ padding: 35px 32px 22px;
|
|
|
background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 100%);
|
|
|
color: #fff;
|
|
|
transition: all 0.5s;
|