Vediojs dynamically adds videos, and the videos are still playing after the video is closed.

/ / Click to play the video

var videoRegion;
$(".visit-btn").on("click", function() {
    if(videoRegion){
        videoRegion.show(),
            videoRegion.play();
    }else{
        $(document.body).append("<video id="my-video" class="video-region video-js vjs-big-play-centered"  loop="loop" autoplay="autoplay"  width="100%" height="100%" preload poster="" data-setup="{}"  poster="/p/images/company/video.png"> <source src="/p/images/index.mp4" type="video/mp4"><source src="/p/images/index.webm" type="video/webm"></video>"),
            videoRegion=videojs("my-video", {
                controls: !0,
                bigPlayButton: !1,
                autoplay: !0
            }, function(){
                videoRegion.width($(window).width());
                videoRegion.height($(window).height());
            });
        console.log(videoRegion.el_);
        $("<div class="fullscreen-close"></div>").appendTo(videoRegion.el_).on("click",
            function() {
                videoRegion.pause();
                videoRegion.exitFullscreen();
                videoRegion.hide();
                $("video").pause();
            })
    }
    videoRegion.requestFullscreen();
});

after clicking to close the video,
videoRegion.pause ();
videoRegion.exitFullscreen ();
videoRegion.hide ();
$("video"). Pause ();

check out, but still play

clipboard.png


is it because the operation area clicked is too small to click?

$('<div class="fullscreen-close"></div>').on("click", function() {
    videoRegion.pause();
    videoRegion.exitFullscreen();
    videoRegion.hide();
    $('video').pause();
}).appendTo(videoRegion.el_)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bd51-273a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bd51-273a2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?