lucaspulliese / vue-cool-lightbox

Vue.js lightbox inspired by fancybox.
https://vue-cool-lightbox.lucaspulliese.com
339 stars 56 forks source link

Single video on click #138

Open robertnicjoo opened 1 year ago

robertnicjoo commented 1 year ago

How can I load single video by clicking on it?

<div v-on:click="startVideo(post.media_url)" class="ratio ratio-16x9">
    <video autoplay muted>
        <source :src="post.media_url" type="video/mp4">
    </video>
</div>

///////////

components: {
    CoolLightBox
},
methods: {
    startVideo(url) {
        var gallery = [{
            src: url,
            autoplay: true
        }];
        // Then what should be here to load video?
    },
}