DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 964,423 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Abolhasan Momeni
Abolhasan Momeni

Posted on

How to delete preview video file with javascript or jquery

js code :

$('#showvideo').on('change', function () {
        var $source = $('#video_here');
        $source[0].src = URL.createObjectURL(this.files[0]);
        console.log($source[0].src);
        $source.parent()[0].load();
    });
Enter fullscreen mode Exit fullscreen mode

html code:

<video class="video"controls>
<source src="mov_bbb.mp4" id="video_here">
</video>
<input type="file" name="video" id="showvideo" class="file_multi_video" accept="video">
Enter fullscreen mode Exit fullscreen mode

...............................................................
I try to delete scr but nothing happen,
how can I deselect the video that selcted.

thanks for your helping guy's,

Top comments (0)

🀯

"I made 10x faster JSON.stringify() functions, even type safe"

☝️ Must read for JS devs