NAME

HTML::Object::DOM::Element::Audio - HTML Object DOM Audio Class

SYNOPSIS

use HTML::Object::DOM::Element::Audio;
my $audio = HTML::Object::DOM::Element::Audio->new || 
    die( HTML::Object::DOM::Element::Audio->error, "\n" );

<h2>Audio inserted with JavaScript</h2>
<div id="myAudio"></div>

my $div = document.getElementById( 'myAudio' );
# Create an element <audio>
my $audio = document.createElement('audio');
# Set the attributes of the video
$audio->src = 'https://example.org/some/where/audio/audio.ogg';
$audio->controls = 1; # true
# Add the aido to <div>
$div->appendChild( $audio );

Result:

<h2>Audio inserted with JavaScript</h2>
<div id="myAudio"></div>
    <audio src="https://example.org/some/where/audio/audio.ogg" controls=""></audio>
</div>

VERSION

v0.2.0

DESCRIPTION

This interface provides access to the properties of <audio> elements, as well as methods to manipulate them.

INHERITANCE

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+     +-----------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Media | --> | HTML::Object::DOM::Element::Audio |
+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +-----------------------------------+     +-----------------------------------+

PROPERTIES

Inherits properties from its parent HTML::Object::DOM::Element::Media

METHODS

Inherits methods from its parent HTML::Object::DOM::Element::Media

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Mozilla documentation, Mozilla documentation on audio element, Wikipedia on audio file formats

COPYRIGHT & LICENSE

Copyright(c) 2021 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.