WWW::SVT::Play::Video::Stream, base class representing a stream
use WWW::SVT::Play::Video; my $svtp = WWW::SVT::Play::Video->new($url); my $stream = $svtp->stream(protocol => 'HDS'); use WWW::SVT::Play::Video::Stream; # get a flashvar json blob, JSON decode it and feed it to ->from_json: my $svtp_stream = WWW::SVT::Play::Video::Stream->from_json($json);
This module is responsible for determining the type of stream object that should be created for each stream.
Takes the following named parameters for setting attributes:
url
type
And in some cases, other protocol specific attributes..
Wrapper around the constructor; can be fed a videoReference element of the SVT Play JSON blob and return an object representing that stream.
Return the url of the stream.
Return the protocol type of the stream (e.g. hds, hls, rtmp).
Is stream using HLS protocol? Should be overriden.
Is stream using HDS protocol? Should be overriden.
Is stream using RTMP protocol? Should be overriden.
Is stream using HTTP protocol? Should be overriden.
This is a default noop stream handler. This method is meant to be called when the user wants to stream the stream using a media player or similar. It should be overriden with a protocol capable handler.
This is a default noop download handler. This method is meant to be called when the user wants to download the stream. It should be overriden with a protocol capable handler.
Copyright (c) 2012 - Olof Johansson <olof@cpan.org> All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::SVT::Play::Video, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::SVT::Play::Video
CPAN shell
perl -MCPAN -e shell install WWW::SVT::Play::Video
For more information on module installation, please visit the detailed CPAN module installation guide.