mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
refactor: Update video element in Artplayer to support custom canvas or video
This commit is contained in:
1 parent
66010cb376
commit
7fa69a7de8
6 files changed
+22
-25
No files matched your search
@@ -14,13 +14,6 @@ function validElement(value, type, paths) {
|
||||
);
|
||||
}
|
||||
|
||||
function validVideo(value, _type, paths) {
|
||||
return errorHandle(
|
||||
value === null || value instanceof HTMLCanvasElement || value instanceof HTMLVideoElement,
|
||||
`${paths.join('.')} require 'HTMLVideoElement' or 'HTMLCanvasElement' type`,
|
||||
);
|
||||
}
|
||||
|
||||
export const ComponentOption = {
|
||||
html: validElement,
|
||||
disable: `?${b}`,
|
||||
@@ -75,7 +68,7 @@ export default {
|
||||
autoPlayback: b,
|
||||
autoOrientation: b,
|
||||
airplay: b,
|
||||
video: validVideo,
|
||||
proxy: f,
|
||||
plugins: [f],
|
||||
layers: [ComponentOption],
|
||||
contextmenu: [ComponentOption],
|
||||
|
||||
Reference in new issue
Block a user