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 viewing the video on the device do not work or do not play this particular 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 browser can come to the rescue.
This article explains how to watch a video without a player . Modern browsers are powerful 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 your browser.
But how to do it, how to send a video file to the browser for playback ? To do this, just create a regular text file and place the following minimal code there:
<video src="file.mp4" controls></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? Tag video 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 the desired video file in it. You can, for example, save a video file and this html document on your desktop, it is important that the file names in the src attribute and the video name 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 required browser from 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:
There is also an easier way - you can play video (as well as other multimedia files) by simply dragging and dropping the file to the browser (select the file and drag it to the open browser window). Or a similar way, open a file using a browser using the context menu - select the file, right-click and select "Open with", then "Select program", and then find the desired browser. In order not to do this in the future, just check the box next to "Use the selected program for all files of this type" and press confirm. As a result, files of this type will be played in a browser without extra software.
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 also 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