refactor: Update video element resizing logic in Artplayer and artplayer-proxy-webav

This commit is contained in:
Harvey Zack committed 2024-08-22 18:29:23 +08:00
1 parent 84986d384a
commit 6f6d49bbae
7 files changed
+16 -11

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { MP4Clip, Combinator } from '@webav/av-cliper';
export default function artplayerProxyWebAV() {
export default function artplayerProxyWebAV(opt = {}) {
return (art) => {
const { option, constructor } = art;
const { createElement, def } = constructor.utils;
@@ -201,7 +201,7 @@ export default function artplayerProxyWebAV() {
throw new Error('No response body');
}
clip = new MP4Clip(response.body);
clip = new MP4Clip(response.body, opt);
} catch (error) {
art.emit('video:error', error);
throw error;