|
@@ -26,14 +26,20 @@
|
|
|
this.VObject = document.createElement('VIDEO');
|
|
|
this.VObject.setAttribute('width', '600');
|
|
|
this.VObject.setAttribute('height', '480');
|
|
|
+ // 设置自动播放
|
|
|
this.VObject.setAttribute('autoplay', 'autoplay');
|
|
|
+ // 设置视频路径
|
|
|
this.VObject.setAttribute('src', v);
|
|
|
-
|
|
|
+ // 设置循环播放
|
|
|
+ this.VObject.setAttribute('loop', 'loop');
|
|
|
+ // 添加到对应的容器中
|
|
|
let VBox = document.getElementById(this.box);
|
|
|
if (VBox) {
|
|
|
+ // 先清空
|
|
|
VBox.innerHTML = '';
|
|
|
VBox.appendChild(this.VObject);
|
|
|
}
|
|
|
+ // 隐藏video标签
|
|
|
this.VObject.style.display = 'none';
|
|
|
}
|
|
|
/** item 宽 */
|