David Warring > Elive-StandardV3-0.01_4 > Elive::StandardV3::Multimedia

Download:
Elive-StandardV3-0.01_4.tar.gz

Dependencies

Annotate this POD

Source  

NAME ^

Elive::StandardV3::Multimedia - Multimedia entity class

DESCRIPTION ^

This command uploads supported multimedia files into your ELM repository for use by your Elluminate Live! sessions.

Once uploaded, you will need to "attach" the file to one or more Elluminate Live! sessions using the Elive::StandardV3::Session set_multimedia() method.

PROPERTIES ^

multimediaId (Int)

Identifier of the multimedia file in the ELM repository.

description (Str)

A description of the multimedia content.

size (Int)

The size of the multimedia file (bytes), once uploaded to the ELM repository.

creatorId (Str)

The identifier of the owner of the multimedia file.

filename (Str)

The name of the multimedia file including the file extension. Elluminate Live! supports the following multimedia file types:

The filename must be less than 64 characters (including any file extensions).

METHODS ^

upload

Uploads content and creates a new multimedia resource. There are two formats:

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


    # 2. source our own binary content
    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::StandardV3::Multimedia->upload(
             {
                    filename => 'whoops.wav',
                    creatorId =>  'alice',
                    content => $content,
                    description => 'Caravan destroys service station',
             },
         );

    $some_session->set_multimedia( $multimedia );

list

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

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

delete

    $multimedia->delete;

Deletes multimedia content from the server and removes it from any associated sessions.

syntax highlighting: