From f1d079f9c0b3d384090477ca54e0548373d62b57 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 16 Jan 2025 11:56:39 +0800
Subject: [PATCH] 配置修改
---
web_src/src/components/dialog/easyPlayer.vue | 67 +++++++++++++++++++++++++++++++++
1 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/web_src/src/components/dialog/easyPlayer.vue b/web_src/src/components/dialog/easyPlayer.vue
new file mode 100644
index 0000000..daf7207
--- /dev/null
+++ b/web_src/src/components/dialog/easyPlayer.vue
@@ -0,0 +1,67 @@
+<template>
+ <div id="easyplayer"></div>
+</template>
+
+<script>
+export default {
+ name: 'player',
+ data() {
+ return {
+ easyPlayer: null
+ };
+ },
+ props: ['videoUrl', 'error', 'hasaudio', 'height'],
+ mounted () {
+ let paramUrl = decodeURIComponent(this.$route.params.url)
+ this.$nextTick(() =>{
+ if (typeof (this.videoUrl) == "undefined") {
+ this.videoUrl = paramUrl;
+ }
+ console.log("初始化时的地址为: " + this.videoUrl)
+ this.play(this.videoUrl)
+ })
+ },
+ watch:{
+ videoUrl(newData, oldData){
+ this.play(newData)
+ },
+ immediate:true
+ },
+ methods: {
+ play: function (url) {
+ console.log(this.height)
+ if (this.easyPlayer != null) {
+ this.easyPlayer.destroy();
+ }
+ if (typeof (this.height) == "undefined") {
+ this.height = false
+ }
+ this.easyPlayer = new WasmPlayer(null, 'easyplayer', this.eventcallbacK, {Height: this.height})
+ this.easyPlayer.play(url, 1)
+ },
+ pause: function () {
+ this.easyPlayer.destroy();
+ this.easyPlayer = null
+ },
+ eventcallbacK: function(type, message) {
+ // console.log("player 事件回调")
+ // console.log(type)
+ // console.log(message)
+ }
+ },
+ destroyed() {
+ this.easyPlayer.destroy();
+ },
+}
+</script>
+
+<style>
+ .LodingTitle {
+ min-width: 70px;
+ }
+ /* 隐藏logo */
+ .iconqingxiLOGO {
+ display: none !important;
+ }
+
+</style>
--
Gitblit v1.9.3