PHP Classes

File: README.md

Recommend this page to a friend!
  Packages of Ramesh Narayan Jangid (Sharma)   Streaming Video   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Class source
Class: Streaming Video
Serve large files to stream video
Author: By
Last change: Readme
Date: 1 month ago
Size: 987 bytes
 

Contents

Class file image Download

Stream Audio / Video

Stream large audio / video files in browser.

Example

video-gallery.html

<video width="100%" height="100%" preload="none" poster="template.jpg" controls="">
    <source src="stream.php?file=/somevideo.mov">
</video>

stream.php

<?php

require_once __DIR__ . '/AutoloadStreamVideo.php';

use StreamVideo\StreamVideo;

$file = $_GET['file'];

$obj = new StreamVideo();
$obj->initFile($file);
$obj->validateFile();
$obj->setHeaders();
$obj->streamContent();

> Note: Update the supportedMimes of media files in the class.

? Contributing

Issues and feature requests are welcome.<br /> Feel free to share them on issues page

Author

? Ramesh N. Jangid (Sharma)

? License

Copyright © 2026 Ramesh N. Jangid (Sharma).<br /> This project is MIT licensed.