国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

html5中 ,media(播放器)的api使用指南

2020-03-24 15:45:02
字體:
來源:轉載
供稿:網友
代碼如下:

<!doctype html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>HTML Audio API</title>

<link rel="stylesheet" href="./style/main.css" />

<script src="./script/audio-controls.js"></script>

</head>

<body>

<header>

<h1>HTML5 Audio API</h1>

<p>HTML5 Audio API demo by <a href="<a href="http://github.com/LearnShare">http://github.com/LearnShare</a>" target="_blank">LearnShare</a>.</p>

<p>

Last update @2013-04-23 20:40:00

+ add info table

update @2013-04-22 14:54:00

+ add DOM events

update @2013-04-22 12:47:00

+ add getCurrentSrc button

</p>

<p>

View code on <a href="<a href="http://github.com/LearnShare/LearnShare.github.io/tree/master/labs/audio/">http://github.com/LearnShare/LearnShare.github.io/tree/master/labs/audio/</a>" target="_blank">LearnShare.github.io</a>.

API reference: <a href="<a href="https://developer.mozilla.org/zh-CN/docs/DOM/HTMLMediaElement">https://developer.mozilla.org/zh-CN/docs/DOM/HTMLMediaElement</a>" target="_blank">HTMLMediaElement</a> and <a href="<a href="http://www.w3schools.com/tags/ref_av_dom.asp">http://www.w3schools.com/tags/ref_av_dom.asp</a>" target="_blank">Audio/Video DOM References</a>

</p>

</header>

<article>

<section>

<h2>Audio Element</h2>

<audio id="audio" src="./media/music1.mp3" controls="controls"></audio>

<p>Open the <strong>developer tool</strong> to view console logs.</p>

</section>

<section>

<h2>Controls</h2>

<button id="play">play</button>

<button id="pause">pause</button>

<button id="get_paused">getPaused</button>

<button id="get_ended">getEnded</button>





<button id="volume_down">volume-</button>

<button id="volume_up">volume+</button>

<button id="get_volume">getVolume</button>





<button id="get_src">getSrc</button>

<button id="play_music1">playMusic1</button>

<button id="play_music2">playMusic2</button>

<button id="remove_music">removeMusic</button>

<button id="get_current_src">getCurrentSrc</button>





<button id="get_initial_time">getInitialTime</button>

<button id="get_duration">getDuration</button>

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 沈丘县| 莱芜市| 五峰| 拉萨市| 阜平县| 安西县| 洞口县| 黄冈市| 密云县| 开鲁县| 永顺县| 百色市| 阿拉善右旗| 桂东县| 安仁县| 西贡区| 双柏县| 卓尼县| 宁蒗| 永登县| 玛沁县| 且末县| 澜沧| 福建省| 准格尔旗| 汽车| 绵阳市| 扬州市| 郸城县| 江口县| 乡宁县| 亳州市| 东台市| 中山市| 拉孜县| 称多县| 高青县| 淳安县| 漯河市| 泗阳县| 志丹县|