视频
This commit is contained in:
parent
488714ac29
commit
bb5eba8d74
@ -5,7 +5,7 @@ import Partners from './Tools/Partners.vue'
|
||||
<template>
|
||||
<div id="homepageroot" class="pageroot">
|
||||
<div id="homepagebanner" style="width: 100%;height: auto;background-color: black; position: relative">
|
||||
<video muted autoplay="autoplay" loop="loop" style="width: 100%;z-index: 0;">
|
||||
<video poster="/bannervideopreload.png" controls="" id="bannervideo" muted autoplay="autoplay" loop="loop" playsinline webkit-playsinline style="width: 100%;z-index: 0;">
|
||||
<source src="/April29th_batch.mp4" type="video/mp4"></source>
|
||||
</video>
|
||||
<div id="hpbanner">
|
||||
@ -125,7 +125,23 @@ import Partners from './Tools/Partners.vue'
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Homepage"
|
||||
name: "Homepage",
|
||||
mounted() {
|
||||
this.$nextTick(function() {
|
||||
this.video_autoplay();
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
video_autoplay:function(){
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var video = document.getElementById('bannervideo')
|
||||
if (video) {
|
||||
video.muted = true;
|
||||
video.play();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -145,6 +161,7 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#secondwhite
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user