NAME

Elive::StandardV2::Multimedia - Multimedia entity class

DESCRIPTION

This class can be used to upload multimedia content, including:

MPEG files: .mpeg, .mpg, .mpe, .m4v, .mp3, .mp4
QuickTime files: .mov, .qt
Windows Media files: .wmv
Flash files: .swf

METHODS

insert

Uploads content and creates a new multimedia resource. You can either upload a file, or upload binary data for the multimedia content.

   # 1. upload a local file
    my $multimedia = Elive::StandardV2::Multimedia->insert('c:\\Documents\intro.wav');

    # 2. stream it ourselves
    open (my $fh, '<', $multimedia_path)
        or die "unable to open $multimedia_path: $!";
    $fh->binmode;

    my $content = do {local $/ = undef; <$fh>};
    die "no multimedia data: $multimedia_path"
        unless ($content);

    my $multimedia = Elive::StandardV2::Multimedia->insert(
             {
                    filename => 'demo.wav',
                    creatorId =>  'alice',
                    content => $content,
	     },
         );

list

my $session_presentations = Elive::StandardV2::Presentation->list(
                               filter => {sessionId => $my_session->id}
                            );

Lists multimedia. You will need to provide a filter that contains at least one of: creatorId, presentationId, description or multimediaId.