add attrMix.js

This commit is contained in:
zhw2590582 committed 2022-01-07 18:35:05 +08:00
1 parent 1438ce5e82
commit 938e8718bc
12 files changed
+268 -232

No files matched your search

+3 -5
View File
@@ -9,13 +9,13 @@ export default class Mobile {
template: { $video },
} = art;
config.events.forEach(eventName => {
proxy($video, eventName, event => {
config.events.forEach((eventName) => {
proxy($video, eventName, (event) => {
art.emit(`video:${event.type}`, event);
});
});
Object.keys(option.moreVideoAttr).forEach(key => {
Object.keys(option.moreVideoAttr).forEach((key) => {
$video[key] = option.moreVideoAttr[key];
});
@@ -35,8 +35,6 @@ export default class Mobile {
$video.autoplay = option.autoplay;
}
$video.controls = true;
const typeName = option.type || getExt(option.url);
const typeCallback = option.customType[typeName];
if (typeName && typeCallback) {