DEV Community

polodev
polodev

Posted on • Edited on

3

Play Videos in Your Browser Using Laravel Video Player

As I was living in a village, my internet connection wasn't good enough to play online videos directly. So I need to download videos from udemy, youtube sites. To watch those videos I need to go to each folder and watch them.

Instead of using vlc and manual watching videos, I tried to build a laravel project where I can watch all videos under a folder. I can categorize them as well by topic.

to download this project visit

https://github.com/polodev/laravel-video-player

It's a Laravel project. just clone it, create a database, and connect database in your .env file

First clone project from github and cd into this project inside terminal



git clone https://github.com/polodev/laravel-video-player
cd laravel-video-player
cp .env.example .env


Enter fullscreen mode Exit fullscreen mode

copy .env.example file to .env and add your database credential



DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_video_player
DB_USERNAME=root
DB_PASSWORD=


Enter fullscreen mode Exit fullscreen mode

In my case database name in laravel_video_player.

website container class and default video width

you can change website container class and default video width from .env file.



CONTAINER_CLASS=container
VIDEO_WIDTH=1200


Enter fullscreen mode Exit fullscreen mode

CONTAINER_CLASS class can be bootstrap container or container-fluid class

Downloading composer package and dumping for autoload



composer install

Enter fullscreen mode Exit fullscreen mode




make a series

copy a folder location from your file manager. go to the create series page by clicking Create series from the menu.

once you created a series, go to series and go to specific series and click on Generate / Regenerate Videos button. It will generate all videos

Image description

Image description

Image description

Thanks

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more