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:
file:///C:/Users/User/Desktop/video.html
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.
Latest articles
- 03.04.24IT / Уроки PHP Уроки простыми словами. Урок 3. Все операторы PHP с примерами, с выводом работы кода на экран.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 2. Типы данных в PHP с примерами.
- 02.04.24IT / Уроки PHP Уроки простыми словами. Урок 1. Коротко о языке веб-программирования PHP. Основы синтаксиса.
- 09.11.23IT / Database Errors when migrating from MySQL 5.6 to 5.7 and how to fix them - database dump import failed with an error or INSERT does not work. Disabling STRICT_TRANS_TABLES strict mode or using IGNORE
- 08.07.22IT / Misc Convert office files DOC, DOCX, DOCM, RTF to DOCX, DOCM, DOC, RTF, PDF, HTML, XML, TXT formats without loss and markup changes