情報学部 | 菅沼ホーム | HTML 目次 | 索引 |
[NamedConstructor=Audio(), NamedConstructor=Audio(DOMString src)] interface HTMLAudioElement : HTMLMediaElement {}; interface HTMLMediaElement : HTMLElement { // error state readonly attribute MediaError? error; // network state attribute DOMString src; readonly attribute DOMString currentSrc; attribute DOMString crossOrigin; const unsigned short NETWORK_EMPTY = 0; const unsigned short NETWORK_IDLE = 1; const unsigned short NETWORK_LOADING = 2; const unsigned short NETWORK_NO_SOURCE = 3; readonly attribute unsigned short networkState; attribute DOMString preload; readonly attribute TimeRanges buffered; void load(); DOMString canPlayType(DOMString type); // ready state const unsigned short HAVE_NOTHING = 0; const unsigned short HAVE_METADATA = 1; const unsigned short HAVE_CURRENT_DATA = 2; const unsigned short HAVE_FUTURE_DATA = 3; const unsigned short HAVE_ENOUGH_DATA = 4; readonly attribute unsigned short readyState; readonly attribute boolean seeking; // playback state attribute double currentTime; readonly attribute unrestricted double duration; readonly attribute Date startDate; readonly attribute boolean paused; attribute double defaultPlaybackRate; attribute double playbackRate; readonly attribute TimeRanges played; readonly attribute TimeRanges seekable; readonly attribute boolean ended; attribute boolean autoplay; attribute boolean loop; void play(); void pause(); // media controller attribute DOMString mediaGroup; attribute MediaController? controller; // controls attribute boolean controls; attribute double volume; attribute boolean muted; attribute boolean defaultMuted; // tracks readonly attribute AudioTrackList audioTracks; readonly attribute VideoTrackList videoTracks; readonly attribute TextTrackList textTracks; TextTrack addTextTrack(DOMString kind, optional DOMString label, optional DOMString language); };
<!DOCTYPE HTML> <HTML> <HEAD> <!-- タイトル --> <TITLE>AUDIO 要素の使用例</TITLE> <!-- スタイルシート --> <LINK REL="stylesheet" TYPE="text/css" HREF="../../master.css"> <!-- 文字コード --> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <!-- スマホ --> <META NAME=viewport CONTENT="width=device-width, initial-scale=1"> </HEAD> <BODY CLASS="white" STYLE="text-align: center"> <H1>AUDIO 要素の使用例</H1> <AUDIO CONTROLS AUTOPLAY SRC="track01.mp3"></AUDIO> </BODY> </HTML>
情報学部 | 菅沼ホーム | HTML 目次 | 索引 |