国产探花免费观看_亚洲丰满少妇自慰呻吟_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>

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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宜兴市| 建德市| 元江| 富川| 松阳县| 台北市| 香港| 齐齐哈尔市| 定兴县| 洞头县| 易门县| 西贡区| 巨鹿县| 临漳县| 崇明县| 长宁区| 玛多县| 临潭县| 德江县| 左云县| 丹凤县| 公安县| 延庆县| 巩义市| 陆丰市| 双江| 曲阳县| 汉寿县| 城市| 长宁区| 崇信县| 定襄县| 昭苏县| 纳雍县| 武平县| 海安县| 龙里县| 陵川县| 武邑县| 修武县| 马山县|