From 7d6ba802a75960fdb049bf7e3448fb64b6817735 Mon Sep 17 00:00:00 2001 From: lin <648540858@qq.com> Date: Tue, 7 Apr 2026 15:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88=E6=9C=ACh2?= =?UTF-8?q?65web?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/common/h265web.vue | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/web/src/views/common/h265web.vue b/web/src/views/common/h265web.vue index a3098dbe9..3cb4a17dc 100644 --- a/web/src/views/common/h265web.vue +++ b/web/src/views/common/h265web.vue @@ -144,35 +144,19 @@ export default { width: '100%', height: 480, color: '#101318', - auto_play: true, + auto_play: false, readframe_multi_times: -1, ignore_audio: false } h265webPlayer[this._uid] = H265webjsPlayer() - h265webPlayer[this._uid].build(options) - - - - // h265webPlayer[this._uid] = new window.H265webjsPlayer(url, Object.assign( - // { - // player: 'glplayer', // 播放器容器id - // width: this.playerWidth, - // height: this.playerHeight, - // token: token, - // extInfo: { - // coreProbePart: 0.4, - // probeSize: 8192, - // ignoreAudio: this.hasAudio === null ? 0 : (this.hasAudio ? 0 : 1) - // } - // }, - // options - // )) const h265web = h265webPlayer[this._uid] - h265web.load_media(url) + h265web.on_ready_show_done_callback = () => { + console.log('ready_show_done_callback') h265web.play() + console.log('ready_show_done_callback---22') this.playing = true this.playerLoading = false } @@ -180,6 +164,11 @@ export default { console.log('video_probe_callback: ', mediaInfo) } + h265web.build(options) + h265web.load_media(url) + + + h265web.onOpenFullScreen = () => { this.fullscreen = true @@ -204,7 +193,7 @@ export default { console.log(this.mediaInfo) canvas.width = this.mediaInfo.meta.size.width canvas.height = this.mediaInfo.meta.size.height - h265webPlayer[this._uid].snapshot(canvas) // snapshot to canvas + h265webPlayer[this._uid].screenshot(canvas) // snapshot to canvas // 下载截图 const link = document.createElement('a')