- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Play local (hard-drive) video file with HTML5 video tag?
The <video> tag is used to add video, with the following video formats − MP4, WebM and Ogg
On selecting a file via the input element.
The change event is fired
The event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is performed by the user.
Getting File object
Object URL pointing to the File object
Use the URL.createObjectURL() static method to create a DOMString containing a URL representing the object given in the parameter.
Set the object URL to the video.src property
Finally, here is how the video is visible. Use the src attribute to add the location (URL) of the video file.
- Play infinitely looping video on-load in HTML5
- HTML DOM Video play( ) Method
- How to play audio and video file in iOS?
- Streaming a video file to an HTML5 video player with Node.js so that the video controls continue to work
- XMLHttpRequest for Video Tag?
- HTML5 Video Tag in Chrome - Why is currentTime ignored when video downloaded from my webserver?
- Commonly used Video formats while using HTML5 video
- Display video inside HTML5 canvas
- Play video on canvas and preserve the last frame/image on HTML5 Canvas
- Using FFMPEG with HTML5 for online video hosting
- How android YouTube app Play Video from Intent
- HTML5 video not playing in Firefox
- Play a video in reverse mode using Python OpenCv
- How to play YouTube video in my Android Application?