diff --git a/pages/component/video/video-format.uvue b/pages/component/video/video-format.uvue index b4fc1691f87b069d6929105dfae82b049cf52893..ea77984fe3a47182db3da1f84a4ec27160f180fa 100644 --- a/pages/component/video/video-format.uvue +++ b/pages/component/video/video-format.uvue @@ -58,7 +58,11 @@ { format: '本地m3u8', src: '/static/test-video/2minute-demo.m3u8' - } + }, + { + format: '错误路径', + src: 'https://www.dcloud.net.cn/errorpath.mp4' + }, ] as Array, notSupportFormats: [ { @@ -74,8 +78,9 @@ } }, methods: { - onError: function (_ : VideoErrorEvent) { + onError: function (e : VideoErrorEvent) { this.isError = true; + console.log(e.target?.getAttribute("id") + ":" + e.detail); } } }