How can I set preview of video file, selecting from input type=’file’

@FabianQuiroga is right that you should better use createObjectURL than a FileReader in this case, but your problem has more to do with the fact that you set the src of a <source> element, so you need to call videoElement.load(). $(document).on(“change”, “.file_multi_video”, function(evt) { var $source = $(‘#video_here’); $source[0].src = URL.createObjectURL(this.files[0]); $source.parent()[0].load(); }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> … Read more

Javascript to stop HTML5 video playback on modal window close

I’m using the following trick to stop HTML5 video. pause() the video on modal close and set currentTime = 0; <script> var video = document.getElementById(“myVideoPlayer”); function stopVideo(){ video.pause(); video.currentTime = 0; } </script> Now you can use stopVideo() method to stop HTML5 video. Like, $(“#stop”).on(‘click’, function(){ stopVideo(); });

Video 100% width and height

By checking other answers, I used object-fit in CSS: video { object-fit: fill; } From MDN (https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit): The object-fit CSS property specifies how the contents of a replaced element should be fitted to the box established by its used height and width. Value: fill The replaced content is sized to fill the element’s content box: … Read more

Dynamically using the first frame as poster in HTML5 video?

Did you try the following? just append time in seconds #t={seconds} to source URL: <video controls width=”360″> <source src=”https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_1MB.mp4#t=0.1″ type=”video/mp4″ /> </video> I have chosen a fraction of second (0.1) to keep number of frames small, because I have the suspect that if you put 1 second, it would “preload” the first 1 second of … Read more

How can I play a local video in my IPython notebook?

(updated 2019, removed unnecessarily costly method) Just do: from IPython.display import Video Video(“test.mp4”) If you get an error No video with supported format or MIME type found, just pass embed=True to the function: Video(“test.mp4”, embed=True). Or if you want to use the HTML element: from IPython.display import HTML HTML(“”” <video alt=”test” controls> <source src=”test.mp4″ type=”video/mp4″> … Read more

Playing m3u8 Files with HTML Video Tag

Might be a little late with the answer but you need to supply the MIME type attribute in the video tag: type=”application/x-mpegURL”. The video tag I use for a 16:9 stream looks like this. <video width=”352″ height=”198″ controls> <source src=”https://stackoverflow.com/questions/19782389/playlist.m3u8″ type=”application/x-mpegURL”> </video>

HTML5 live streaming

A possible alternative for that: Use an encoder (e.g. VLC or FFmpeg) into packetize your input stream to OGG format. For example, in this case I used VLC to packetize screen capture device with this code: C:\Program Files\VideoLAN\VLC\vlc.exe -I dummy screen:// :screen-fps=16.000000 :screen-caching=100 :sout=#transcode{vcodec=theo,vb=800,scale=1,width=600,height=480,acodec=mp3}:http{mux=ogg,dst=127.0.0.1:8080/desktop.ogg} :no-sout-rtp-sap :no-sout-standard-sap :ttl=1 :sout-keep Embed this code into a <video> tag … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)