Omar Salix > Video-M3U8-0.0.3 > Video::M3U8

Download:
Video-M3U8-0.0.3.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

Overview ^

Module for fetching and working with M3U8 manifest files. This is for individual manifests not multi-variant playlists (I may eventually create a module that builds on this)

new

        $m = Video::M3U8->new($url_or_filename)

If the string contains 'http', new() will fetch the contains from the web, if it does not, new will read from the file and process the contents, the contents are read into a hash once. since its possible for playlists to be updated consistently, the only time it is fetched is on 'new()', all other functions work from cache, each new manifest or seeking updates should be called again.

Get playlist

Function will return the entire manifest/playlist

        $m->get_playlist

Get tags

If you would just like to use the tags;

        $m->get_tags

Checking for the last playlist

If its an Ondemand playlist or the last in a Live stream (contains EXT-X-ENDLIST tag) this sub will return '1' (true)

        $m->is_last_playlist

Checking for target duration

Function will return the target duration

        $m->get_target_duration

AUTHORS ^

 Copyright (c) 2012
 Cost: tell me about bugs or points to improve - have fun.
 Omar Salix, <osalix@gmail.com>
syntax highlighting: