moodrain/laravel-streamer

simply stream video file from local

v1.0.0 2020-03-11 00:19 UTC

This package is auto-updated.

Last update: 2022-01-18 20:13:56 UTC


README

Install

composer require moodrain/laravel-streamer

Usage

use Moodrain\LaravelStreamer\Streamer;

class Controller {
    public function video() {
        return Streamer::stream(storage_path('demo.mp4'));
    }
}

or see demo

Config

php artisan vendor:publish --provider="Moodrain\LaravelStreamer\ServiceProvider"

edit config/laravel_streamer.php

return [
    'buffer' => 2 * 1024 * 1024
];

set buffer size you wish, 2 MB is default size