Olof Johansson > WWW-SVT-Play-0.12 > WWW::SVT::Play::Video::Stream

Download:
WWW-SVT-Play-0.12.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.12   Source  

NAME ^

WWW::SVT::Play::Video::Stream, base class representing a stream

SYNOPSIS ^

 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);

DESCRIPTION ^

This module is responsible for determining the type of stream object that should be created for each stream.

CONSTRUCTOR ^

new

Takes the following named parameters for setting attributes:

And in some cases, other protocol specific attributes..

from_json

Wrapper around the constructor; can be fed a videoReference element of the SVT Play JSON blob and return an object representing that stream.

METHODS ^

url

Return the url of the stream.

type

Return the protocol type of the stream (e.g. hds, hls, rtmp).

is_hls

Is stream using HLS protocol? Should be overriden.

is_hds

Is stream using HDS protocol? Should be overriden.

is_rtmp

Is stream using RTMP protocol? Should be overriden.

is_http

Is stream using HTTP protocol? Should be overriden.

stream

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.

download

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 ^

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.

syntax highlighting: