cbopp-art / lightcase

The smart and flexible Lightbox Plugin.
https://cornel.bopp-art.com/lightcase/
Other
400 stars 106 forks source link

Autoplay not working without any trigger link #161

Open alicankablan opened 5 years ago

alicankablan commented 5 years ago

My html video is not playing auto at document ready

Here is my html : <video src="myvideo.mp4" width="800" height="450" poster="" preload="auto" controls="controls" autobuffer="true" autoplay="autoplay" onended="lightcase.close();" style="width: 800px; height: 450px; max-width: 800px; max-height: 492px;"></video>

     function Html5Video() {
        lightcase.start({
            video: {
                width: 800,
                height: 450,
                poster: '',
                preload: 'auto',
                controls: true,
                autobuffer: true,
                autoplay: true,
                loop: false,
                onended: 'lightcase.close();'
            },
            href: 'myvideo.mp4',
            caption: 'caption 123',
            title: 'title 123',

            onFinish: {
                autoClose: function () {
                    setTimeout(function () {
                        lightcase.close();
                    }, 15000);
                }
            }
            // more options like width, height, etc.
        });
    }
cbopp-art commented 5 years ago

Hi! Are you sure this is an issue of lightcase rather than it is something wrong with your video params and attributes? Try to embed and autoplay your video outside of the lightcase first to make sure this is an issue of this plugin.

Thanks