How to watch local video in a browser without a player
Sometimes it happens that you need to watch a video, but the programs for watching videos on the device do not work or do not play your video. There may be no time to fix the problem, or you may not want to search and download new programs, and even more so, because of one video, expose your computer to threats of virus infection. In this case, your favorite browser can come to the rescue.
This article explains how to watch a video without a player . It would seem impossible, but no. Modern browsers have powerful functionality and can replace many programs with built-in capabilities or extensions. Such browsers today support HTML5 , and this means that you can simply play the video using a browser.
But how to do it, how to send a video file to the browser for playback ? It's pretty simple. Let's create a plain text file and place the following minimal code there:
& lt; video src = "file.mp4" controls> & lt; / video>
Then you need to save it and change the extension from txt to html, or you can immediately save it in html format.
What does this code do? The video tag < / strong> creates a video player on the page, and since we specified the controls attribute, the player control buttons will be shown. The main attribute of the tag is src , it is necessary to write the path to your video file in it. You can, for example, save a video file and this html document on your desktop, it is important that the filenames in the src attribute and the name of your video match.
When everything is ready, open the html file in the browser, for this you can right-click on it and select "Open with", select the desired browser in the drop-down list. This will open the browser and start local video playback in the browser . Also, instead, if the browser was already open, you can manually go to the address where the saved html file is located and open the video for playback. An example of a local address:
The browser's built-in video player can even play files that cannot be played by standard system players. For example, if there are no codecs in the system or if the video file does not contain metadata, etc. Therefore, this solution may come in handy - watch the video without a player using a browser . The browser can solve other tasks , but more on that in the next articles.
- IT / Misc 08.07.21 How to make a free translation for a website without an API, translate documents in Google Translate
- IT / Misc 06.07.21 How to make a subscription button on a website, a subscriber base and automatic mailing
- Food / Misc 06.07.21 How to quickly cook delicious fried pies with potatoes and onions
- IT / Misc 04.07.21 Caching - create, load and reset. Where to store the cache, methods and types of caching
- IT / Database 03.07.21 Custom NoSQL - storing data in files and not only in a database. Storing settings, small data and caching files