Skip to content

chrisyue/php-m3u8

Repository files navigation

PHP M3u8

Latest Stable Version License CI Status Total Downloads Donate

An M3u8 parser / dumper.

Now it fully supports for RFC 8216, and it can support for non standard M3U(8) with little effort.

Installation

Use composer to require it:

composer require 'chrisyue/php-m3u8:^4' # PHP 7.4 or PHP 8.*
composer require 'chrisyue/php-m3u8:^3' # PHP 5.6 or PHP 7.{0,1,2,3}

Quickstart

Setup the demo project and install PHP M3U8 with it:

mkdir demo
cd demo
composer require 'chrisyue/php-m3u8:^4'

Copy the demo script file to the project root:

cp vendor/chrisyue/php-m3u8/demo/demo.php .

And run:

php demo.php

You could check the demo file out to find out how to use.

As a "Facade" hides too much details, if you take a look of those facade classes, you'll notice that the real parser/dumper will take a "tag definitions" and a "parsing/dumping rules" as it's dependencies. "definitions" and "rules" are actually "configuration". All these "configuration"s are written in PHP. You may want to modify those configuration files to meet your needs. For more information, see

Donation

Thanks for your support :)

paypal

Wechat Donation