This Go code provides an HTTP video server that can serve a video file over HTTP protocol. By running this code, you can open and play the desired video file in your browser.
Install my-project with npm
1-run command "git clone https://github.com/mohammadhasanii/Go-Videostream.git"
2-Replace your video file in the path "./febe802d7618d6cd2e2b834f4ce824e053429593-480p.mp4".
3-Run the executable file with the following command:
go run app.go
4-Open app.html in your browser to see the streaming video
-
In this code, the video file is assumed to be in MP4 format. If your video file is in a different format, you need to modify the content type header appropriately.
-
To see the streaming video, you need to open app.html in your browser. This file is included in the project directory.