得知互动
标题:
html5中 media(播放器)的api使用指南
[打印本页]
作者:
swmozowtfl
时间:
2015-7-26 20:46
标题:
html5中 media(播放器)的api使用指南
代码如下:
. {; m2 [/ U. Q: U8 k+ s
<!doctype html>
( w3 v* x$ z* l. E" P/ k
<html lang=en>
% W3 y2 j- _2 d6 P! ~7 N
<head>
* N% {& ^2 N' y8 j9 B& N
<meta charset=utf-8>
W3 t( H; k8 {" @$ F& a2 {, O
<title>html audio api</title>
: q5 I: l3 L2 T2 O8 R, A
<link rel=stylesheet href=./style/main.css />
' [4 `, r" b" m# y: X
<script src=./script/audio-controls.js></script>
6 B) Q6 [5 C& l/ T r
</head>
$ S8 j9 P1 f$ f8 F
<body>
# r3 z! o$ Y9 m) Q- G% A2 d7 d
<header>
. K7 S- S) }* i S( h% S [; g- }
<h1>html5 audio api</h1>
/ C5 P$ N8 }4 a& `, }/ w
<p>html5 audio api demo by <a href=<a href=> target=_blank>learnshare</a>.</p>
& W1 e d8 h0 V
<p>
% Z; Q+ ?( r8 l E
last update @2013-04-23 20:40:00
$ S. {5 D {: n/ B. @! Q
+ add info table
; i/ h+ `$ I. ?, u
update @2013-04-22 14:54:00
) |8 m5 w+ e+ X, y
+ add dom events
6 F( k$ N" z9 X4 M' y- ?: N( K
update @2013-04-22 12:47:00
* O9 n% n/ t4 d& a
+ add getcurrentsrc button
" W G1 c# Y+ I" O9 `
</p>
- ^1 K: c2 e; A- x1 U, i1 Q. u
<p>
. \8 K# [% t7 g: M3 e6 l: \/ C
view code on <a href=<a href=>
2 T& P7 c. C% w
> target=_blank>learnshare.github.io</a>.
0 U6 D0 J0 `, B. `" n/ d
api reference: <a href=<a href=> target=_blank>htmlmediaelement</a> and <a href=<a href=> target=_blank>audio/video dom references</a>
4 y2 G' Q, z t0 x _# @+ j) R
</p>
; O+ H$ Y0 U7 V. U2 z
</header>
& d. k% X' D0 Y5 r2 ~+ |1 m
<article>
* e: O0 |) U, d( v4 K8 H
<section>
6 x- w3 U' E% ]% P
<h2>audio element</h2>
/ G- Y3 O) d4 U% E. u3 t
<audio id=audio src=./media/music1.mp3 controls=controls></audio>
, o8 E+ n4 ~2 A7 m
<p>open the <strong>developer tool</strong> to view console logs.</p>
" j J6 Y/ i+ \0 e* D" C( ?( I
</section>
V7 l& b7 V9 f- v0 R/ H
<section>
2 \) u3 P# h5 Q) W* w
<h2>controls</h2>
; A9 g) Q5 [0 O# M
<button id=play>play</button>
0 N; Y% u1 O* m8 a
<button id=pause>pause</button>
' W: C0 Z9 X: T1 I! A) V" Q# [
<button id=get_paused>getpaused</button>
; n$ `+ j, u! z* E- [
<button id=get_ended>getended</button>
% G+ ~! V6 S3 d( M6 [5 [. ^
2 ]( a& M3 u" |: ?' l
<button id=volume_down>volume-</button>
. c" |3 D: \+ ~! M1 ~$ X/ `% e5 d
<button id=volume_up>volume+</button>
, [0 v3 Z# S. j
<button id=get_volume>getvolume</button>
: Z$ D( {& R; R; O4 @# u8 B3 k9 H
- m; F; r; p9 A
<button id=get_src>getsrc</button>
& j1 R6 s$ K+ B% f0 z8 C' K v
<button id=play_music1>playmusic1</button>
; }8 A S4 T, S m3 F/ D
<button id=play_music2>playmusic2</button>
* H4 ]. e6 D4 j$ o
<button id=remove_music>removemusic</button>
% W- e: d o- E
<button id=get_current_src>getcurrentsrc</button>
) \6 ]2 `& O" s% s. a
# W" s& H4 f4 ^! [, s
<button id=get_initial_time>getinitialtime</button>
t G, }. J0 I5 }( O( C( L
<button id=get_duration>getduration</button>
. [+ N$ O8 M" R6 k# p4 `2 r
<button id=get_seeking>getseeking</button>
! g" Y9 M" u* M5 l A" H/ _, e
<button id=jump_to>jumpto_30s</button>
& Y3 e: ^; s9 C
<button id=get_current_time>getcurrenttime</button>
% V* A- e4 L: x6 f! ^0 q! Z; t7 R
<button id=get_played>getplayed</button>
6 ]; T% ~. Z% G2 Z( S3 f
0 F# y" }3 U% K$ H. {
<button id=autoplay_on>autoplay_on</button>
: N2 p( Z' f2 s3 {7 T* k
<button id=autoplay_off>autoplay_off</button>
! l) B1 Z! r8 ^9 @' T; j2 u
<button id=get_autoplay>getautoplay</button>
7 I/ V& X& K+ u' X! i$ A
+ M$ Y* m/ q" ^
<button id=controls_show>controls_show</button>
6 n5 @9 @2 j* g8 s; n
<button id=controls_hide>controls_hide</button>
2 D1 K/ z* Z: ?! b6 {
<button id=get_controls>getcontrols</button>
7 D7 V! w1 m- P5 k/ e: v5 B
, O, U8 j7 [1 j! ^" C% Y r
<button id=loop_on>loop_on</button>
1 f2 A, ?+ p, A$ _5 M
<button id=loop_off>loop_off</button>
! P! |, m3 B6 ~+ W( y
<button id=get_loop>getloop</button>
# h Q# r; ~; j% M2 ^: q
( `4 K: v% R* M' m6 G2 y% @
<button id=preload_metadata>preload_metadata</button>
0 K' h7 X. h7 A0 V0 q1 V
<button id=get_preload>getpreload</button>
% c) S1 |6 l. i6 O
7 L: O1 ]2 L' y# r
<button id=get_default_muted>getdefaultmuted</button>
1 [7 m" {0 Q, ~( Z0 x: Y
<button id=mute>mute</button>
& p3 y# `" i0 U5 X
<button id=unmute>unmute</button>
; n4 Q# Z0 x% B9 e3 D, i
<button id=get_muted>getmuted</button>
& B: g" {1 N9 X7 n P0 |
: d6 N4 K8 n. m, @
<button id=get_default_playback_rate>getdefaultplaybackrate</button>
% s' ?$ f n! c
<button id=playback_rate_down>playbackrate-</button>
+ r# Y2 y5 \+ k X* I
<button id=playback_rate_up>playbackrate+</button>
5 d# b! z' q2 w0 x& b" a9 W& J; [
<button id=get_playback_rate>getplaybackrate</button>
, i4 @0 `% F; a
0 E- H/ U2 D; ^! S3 V
<button id=get_network_state>getnetworkstate</button>
7 V6 M) r% M+ Q/ ~3 ^" [
<button id=get_ready_state>getreadystate</button>
# x4 s/ g! q; b% U, C1 `- {
<button id=get_buffered>getbuffered</button>
) k, Q5 K2 J2 g( S; @2 N
<button id=get_seekable>getseekable</button>
( v3 r4 ~) U6 K
</section>
+ [# {/ a" t) [$ j, {
</article>
7 }% _* W9 f% e/ [" z9 P( l0 U- J
<aside>
! z+ ]8 b4 V6 w8 G
<section>
4 s) J2 u" U( \+ h/ [3 u& U8 {
<h3>player attrs</h3>
) g' i4 I0 k" X5 A4 Z0 x7 T- g
<table>
\9 ?* ~0 [; P5 Z9 W/ p- r, N
<tr>
3 M3 b' p+ {7 a% o6 R. J' h
<td>autoplay:</td>
: N- o. \4 ~% ]4 F8 A
<td id=autoplay></td>
2 z( [- k- F; b1 w2 k. F' a) P
</tr>
8 h5 [3 D- L* P) `
<tr>
7 |8 ^* B) m! K, E* b g( x
<td>controls:</td>
( y- o6 {9 T, l5 M }
<td id=controls></td>
$ j9 a2 v, u! Q) l
</tr>
+ M& {4 O0 J$ Q8 _7 S; M) S
<tr>
3 Y% z8 A5 R' d* P1 {# \- W' v
<td>defaultmuted:</td>
+ z- H. y. @7 o; E% s
<td id=default_muted></td>
( o3 {9 |) p) T8 Z/ Y- c
</tr>
! K1 f/ Q; [5 k+ R% A* l0 x* {, V# p8 Z
<tr>
( {) B" n7 F5 g0 E* N1 l
<td>defaultplaybackrate:</td>
( r5 ^; O. m2 P5 u7 g
<td id=default_playback_rate></td>
5 I. Z8 ^/ s8 I3 e- J3 q
</tr>
- M* b% W3 D0 u! L+ [2 ?2 }
<tr>
7 R* T" t0 _) \ X5 A, x
<td>loop:</td>
) v9 l- J+ y7 z J6 w$ y" C# y
<td id=loop></td>
- I B' C' I) v4 Z. q
</tr>
$ F( r, `8 G# P6 ^
<tr>
* O. v2 \2 A. s& s/ {/ s$ P
<td>preload:</td>
. o! W. f z1 n+ T6 K' [1 K; {
<td id=preload></td>
) ^0 v5 T- W+ e; a
</tr>
8 [0 C4 x X4 @
</table>
2 K2 K) n" f2 D9 {
</section>
8 ]/ z W, q, D
<section>
9 T: ^! d1 [$ S8 Q
<h3>player info</h3>
( P/ p, }8 _7 }, H+ @. c
<table>
* f9 y: r0 _+ }0 o( C
<tr>
& @# V" w4 `0 M) B# \1 {2 ]! _
<td>src:</td>
* M, i( t3 A% J4 c8 g6 D' F
<td id=src></td>
, E4 h9 \, h" F! o" M1 X
</tr>
. R( T, n- [ Y7 _. }- W! t4 Q1 f
<tr>
( j' l( e. R+ Y$ E( u0 h
<td>currentsrc:</td>
- q" L0 K" Y+ D) X
<td id=current_src></td>
0 v; W! g# E8 o* w. g8 G
</tr>
& Q0 C3 ?/ r, F
<tr>
- k$ f& R& C& D) H: a6 n3 L' W N
<td>duration:</td>
" `, c: C$ f' ] e2 w
<td id=duration></td>
; K' ?& B Y G1 g& e: p$ V( L$ z
</tr>
- t) y$ S- c# t) ?
<tr>
( H. h- }2 [. g) n# C3 D2 I: D1 C
<td>currenttime:</td>
' z& z* c8 e2 h( C9 Y9 `
<td id=current_time></td>
! Z6 P- g5 S3 W1 G+ @4 _, A+ j
</tr>
: T! u7 v, _8 x$ q4 x1 a
<tr>
: Y' v2 z3 S; j' _, p% s
<td>ended:</td>
7 O8 Z; J! k h$ X
<td id=ended></td>
+ A+ ~" M# h- |
</tr>
, K: g$ k! I; N
<tr>
9 w) U) A% p5 G5 V
<td>paused:</td>
* j s& T% A, \! @% {
<td id=paused></td>
# ]# g; }: [% w a0 J2 C- ^5 d
</tr>
4 \) y! ^- o1 i- D ~ }8 m
<tr>
% r/ X7 }9 R- }- H |9 L8 Y
<td>muted:</td>
- U6 U( Q6 N" l1 g6 [; E1 x0 K' `
<td id=muted></td>
$ O3 I o7 i/ q1 }
</tr>
: R4 R; }5 D7 x8 ~7 l1 Y8 G$ }% r% P
<tr>
9 Q8 A, B* l" h1 Q* L5 _0 o- W6 v
<td>volume:</td>
# X" N7 y2 X3 K4 h) ^8 w/ M ~. E$ q
<td id=volume></td>
9 d# u: o8 Z" {2 w7 }
</tr>
" n9 l/ @) Y. ^& `0 |
<tr>
) a' t7 n/ ?6 O7 j
<td>playbackrate:</td>
: X `( o: T; c: h1 E
<td id=playback_rate></td>
- e0 T$ G# r/ x/ ?+ S G% V; T
</tr>
. i+ H; x6 Q, G) z
</table>
' `0 }- C& p# i
</section>
& t1 W8 [$ m, I% R, Y. M( s; C
<section>
) Z" |) N, X6 w8 w$ _8 A
<h3>play status</h3>
! I' M. P a( w/ U) A+ B3 ^
<table>
$ l( n. o2 M+ I" v D1 T
<tr>
@& T w d( V" Y2 v4 |
<td>networkstate:</td>
3 S5 h# e: Y4 E3 ^* [
<td id=network_state></td>
4 s+ `- F' K$ _) C; e" b& _7 f
</tr>
6 `7 W* B( {) R9 R- J9 L3 J
<tr>
2 [4 j2 y5 O2 C m9 D
<td>readystate:</td>
1 Y5 J8 {! q+ m+ Z) B0 T6 T
<td id=ready_state></td>
! E! x8 ]: F' s8 ?8 q+ v9 w
</tr>
' c8 A2 u: B9 K# [: m9 x
<tr>
* W% J6 b" \) n7 T1 {" t8 `
<td>buffered:</td>
2 u9 D5 }, _9 X, v
<td id=buffered></td>
8 O8 z% o0 y! W, v; Z
</tr>
( y+ T7 x0 \' k; a3 t
<tr>
! A+ K7 {$ B; j) u' U2 y; V6 l
<td>seekable:</td>
7 z% x5 w+ l6 I/ _. ^0 Z6 t
<td id=seekable></td>
; d3 X+ r, _) k
</tr>
, y4 ] Q+ c, M1 W8 S. T. M, X
<tr>
8 I/ u) {1 }) {4 A2 f; ?
<td>played:</td>
4 j, X% F6 V* i6 T: | p) o! k
<td id=played></td>
# \2 T/ ?# v. c% x4 N9 s' {1 S
</tr>
& E1 H2 Z7 x6 Z3 K# B; U2 `3 q
<tr>
0 m) r5 S2 p" |% K" O5 _
<td>error:</td>
: |( W+ Q4 h1 z$ d2 `
<td id=error></td>
. Z: Q! {/ z9 _9 b+ D
</tr>
" b- j5 t. c7 t! N4 l6 s; p
</table>
. q Q8 [# n$ [+ N
</section>
4 d6 X- u8 k+ k w
</aside>
& Y M7 s) E u0 q/ K; q% n
</body>
% T! v. c1 e+ ?( S3 Y. [
</html>
' k! w4 _- x( K8 ]4 W6 H
1 K9 P1 x" R/ R3 |
audio-controls.js
5 d2 k( t7 P! y$ J) M4 A8 P
3 h: w" p; d! K H1 m4 L+ E& l
代码如下:
0 T/ u7 m8 N4 d3 ^; I
window.onload=function(){
4 @) H$ \! z0 N7 g6 d
// get autio element
( O: R2 A. n& ?. G9 C5 u
var audio=document.getelementbyid(audio);
# q* O4 ?/ w1 B7 O0 C
// play()
; l. {7 S* g7 w# l9 D/ U
document.getelementbyid(play).onclick=function(){
* p5 j! ?% N5 d) f$ }+ U/ s
audio.play();
( g1 N/ [# R" m: F2 l* O
console.log(play);
1 r K$ S) _% p2 \
};
, M. I: Q8 x! l( {
// pause()
: A @ c, G# K1 ^+ F
document.getelementbyid(pause).onclick=function(){
5 b% T- d+ M `1 b, z; R
audio.pause();
2 }5 Q5 D* P3 w( U7 h1 w5 O
console.log(pause);
4 w2 |0 L9 a! i/ [: v& k
};
; I8 U( M6 Y% d* i5 D# x" u
// get paused
3 M2 T {2 q. d7 J: S: k
document.getelementbyid(get_paused).onclick=function(){
" j7 R$ \5 u) {# f+ j6 }
console.log(audio.paused: +audio.paused);
% M- D/ W; r( I4 t8 m) o: o: I- ]
};
; M# J3 a3 ^6 B; i. ~
// get ended
. l# p2 U, O0 N
document.getelementbyid(get_ended).onclick=function(){
+ ^" f4 @0 l5 d& _
console.log(audio.ended: +audio.ended);
( i, q9 S+ m0 [: H
};
t" H0 G" M7 q+ G5 R8 T0 Q
// set volume-
! N9 G! f" m# w% E; B* z2 b3 j* Q4 A
document.getelementbyid(volume_down).onclick=function(){
& {. g! y5 O# e: j3 J+ v
audio.volume-=0.2;
+ p- C2 w& {/ ^) I
console.log(volume-0.2);
: U7 w- ]& T+ J* ^
};
( {2 C/ q _. M0 C& N5 L9 A
// set volume+
' M% O. ]* q: |7 @7 q) ]$ j# Q9 h5 g
document.getelementbyid(volume_up).onclick=function(){
) V3 D1 r4 ]0 K' D$ O
audio.volume+=0.2;
0 C$ F4 e' Y! v5 O
console.log(volume+0.2);
( Q! h5 Z" B4 ~' T+ V
};
b+ D. V* T7 w F$ U; U
// get volume
; L' f8 P" y& A, J+ X+ o+ H
document.getelementbyid(get_volume).onclick=function(){
" a* m9 p$ y0 L3 `
console.log(audio.volume: +audio.volume);
9 s# P h/ e& O" a
};
4 ?. b3 _; Y# d- j" l0 t" n0 {1 p( }/ A
// get src
& K; C; y+ O8 I4 ~/ B
document.getelementbyid(get_src).onclick=function(){
( _9 I" v, q+ D5 w- F2 \0 s. v
console.log(audio.src: +audio.src);
% [( T/ k9 Z- v+ _5 X+ I- z
};
! b9 {/ N1 `2 h5 R
// set src_music1
: E+ ~# b, P. } x9 i5 q9 v! u7 o8 X6 Y
document.getelementbyid(play_music1).onclick=function(){
7 ]+ `% w( ~' p
audio.src=./media/music1.mp3;
" C7 I, G! m7 ?. R9 P
updatesrc();
# ]; j, o. b5 S% w. S7 ~
updatecurrentsrc();
" D& K8 g" j: K) I* I) k( q
console.log(play music1);
5 F: H% j3 B# A9 F$ t( l
};
5 h0 L/ k/ v" b: Z8 N9 r6 X
// set src_music2
$ ~( L$ p, P2 S- R8 @
document.getelementbyid(play_music2).onclick=function(){
9 r1 d' r q. O8 j
audio.src=./media/music2.mp3;
9 ^9 g: P8 M. U
updatesrc();
; }8 _( e9 q- I! z, K
updatecurrentsrc();
8 d& }" t% W+ U5 F7 v& Q' _7 M' |5 a
console.log(play music2);
+ [7 U9 Y) J% `0 o
};
. C; L' H. N2 D6 V; N( r6 ]& T
// set remove_music
- Y; \$ l6 M2 _: x* `" @3 o
document.getelementbyid(remove_music).onclick=function(){
+ J8 F: S: O1 i6 i, M
audio.src=;
& u0 P ]( E' i' i9 a" S) m
console.log(remove music);
+ I, j% C7 o( `: v# k
};
* D, n3 O4 l$ O0 u0 o8 Z
// get currentsrc
3 P% n% ^- U6 P( r) U$ [" A
document.getelementbyid(get_current_src).onclick=function(){
+ F7 p1 v# h* g4 y, B
console.log(audio.currentsrc: +audio.currentsrc);
' h7 L# m" @8 m" Y
};
" z% T6 `: ~- w. U6 }0 N1 e0 D3 D
// get initialtime
: c# D A7 B2 W- o& y& a
document.getelementbyid(get_initial_time).onclick=function(){
! L; W# [' x8 ~& ^
console.log(audio.initialtime: +audio.initialtime);
) {2 f. K9 b! P y" p
};
1 j" N4 ?/ V/ }1 W( O
// get duration
- B5 \9 A# ?; W6 ^" D' }
document.getelementbyid(get_duration).onclick=function(){
' |3 I5 r+ h# g3 l4 r% Z1 M, s
console.log(audio.duration: +audio.duration);
4 x9 m+ n7 V9 R) d4 {8 J
};
; D9 W+ W# E$ g: S
// get seeking
- c0 p% u7 U1 K0 ]! [3 Q; ?4 q& }; P1 p
document.getelementbyid(get_seeking).onclick=function(){
* O* C; u& z) w0 U7 B
console.log(audio.seeking: +audio.seeking);
4 `( C" \$ v0 R- Y3 c
};
& t3 `8 I3 `* b1 j- |1 `4 u" ]% B
// set currenttime
1 F0 ~' I) f, r7 U, _, N
document.getelementbyid(jump_to).onclick=function(){
& D8 p0 |8 E/ q
audio.currenttime=30;
4 ?; _, f/ U# M+ o' L
console.log(jumpto 30s);
6 O0 h# }, c3 w. P7 |* F
};
% z0 k* {, B) y1 t5 J
// get currenttime
( G6 R( ?- G6 U+ h7 S! s& U% n
document.getelementbyid(get_current_time).onclick=function(){
' S. n1 T, t9 h# u% _
console.log(audio.currenttime: +audio.currenttime);
3 E/ x I$ `( i+ |" ]
};
( F5 v: h2 X* s4 z
// get played
: l* p) w( Q8 r# [6 ?
document.getelementbyid(get_played).onclick=function(){
4 K6 J t; \* ]0 b) p* n0 c
console.log(audio.played:);
2 i M" g8 [# A* D
var ranges=audio.played;
- ^' s% L9 P! H% ?$ W
var n=ranges.length;
. M2 O$ z) ]0 ^* I4 r' F0 e& q
for(var i=0;i<n;i++){
T* w T3 r) i& s5 _) B
console.log((+ranges.start(i)+,+ranges.end(i)+));
( b3 T; L! l# R( F" v9 S( l! t
}
3 }1 |3 }5 W, B
};
% J3 z7 `! a9 k5 n# i' d. {0 M
// autoplay on
+ ]8 n" n1 c) m1 A- A
document.getelementbyid(autoplay_on).onclick=function(){
1 J5 X! q& w) g: O1 o
audio.autoplay=true;
2 C4 W# I) s# m2 q2 L" G1 z0 A
updateautoplay();
F& x' H8 }+ U3 @8 b' i
console.log(autoplay on);
% u" z1 p- Y$ ?8 _' `
};
4 |' p! s" a2 n @' o* D
// autoplay off
& w( l: I' o4 H4 ]2 ~8 x5 ]
document.getelementbyid(autoplay_off).onclick=function(){
$ b$ p9 Q3 w3 q5 O- O
audio.autoplay=false;
1 j1 u% A4 g7 {, G2 R, i, D
updateautoplay();
) h. w: Y( W5 o# [1 `! M
console.log(autoplay off);
6 w/ E6 S. ]. w) ^
};
0 v3 K& \) ^1 _% B0 ?# u" q
// get autoplay
" r* Q" i0 f, B5 @% ?2 m6 |8 B5 l
document.getelementbyid(get_autoplay).onclick=function(){
+ Q# w1 j& C# x1 u+ m8 S- _
console.log(audio.autoplay: +audio.autoplay);
+ s# Q: w) t) h# U; r; L9 J3 e! y
};
4 O; U# W$ h' i
// controls show
2 n4 i* V& O) | Q3 E
document.getelementbyid(controls_show).onclick=function(){
3 y( K3 }5 v* `* D1 n1 \
audio.controls=true;
8 \8 |4 @7 f, b$ _& V6 N
updatecontrols();
1 h! Q+ U7 M- y
console.log(controls show);
+ o' s* B- U9 Z( g
};
+ t: |0 t+ |' q: C& `! z+ [1 G
// controls hide
: O m! s( O' O2 I h
document.getelementbyid(controls_hide).onclick=function(){
k9 N; F9 \9 }* E/ b) R9 X6 l
audio.controls=false;
, O9 q9 n) z, t
updatecontrols();
" S8 q; u. W) A2 {" K. Y
console.log(controls hide);
; s. e. g8 U3 z4 b3 h4 V
};
, q; B! H% x' j7 b
// get controls
2 W" w( {' b" f. _
document.getelementbyid(get_controls).onclick=function(){
) q+ k* L+ {) ~3 X. c; p
console.log(audio.controls: +audio.controls);
1 l1 s+ G9 m) g" c8 a1 ~) M. o2 ?
};
; { M1 v8 b8 t, {& [# @2 {( e
// loop on
" t; r6 Z$ b) Q4 f& M) n9 a
document.getelementbyid(loop_on).onclick=function(){
' a6 D2 l! V( h2 M5 ^
audio.loop=true;
, h- o @9 e- q5 i$ M3 ]
updateloop();
, i: G, ~. p" I2 r0 n1 m
console.log(loop on);
8 p/ D+ |2 H& {7 Y+ g1 t. d! G
};
b: z$ q9 S# o; R$ h, x
// loop off
% ]( R; I$ E7 C( u C
document.getelementbyid(loop_off).onclick=function(){
7 Z( a7 W& j$ z4 ? f8 e7 q
audio.loop=false;
, Q/ F& v( l' Y4 J- e
updateloop();
# P0 r6 Z; |2 l/ v, c* X) i5 q
console.log(loop off);
; ^+ L2 e: t* F* `: Q
};
4 _4 ^% C5 i: D* W9 R6 _
// get loop
2 f% [, p1 N: N+ q
document.getelementbyid(get_loop).onclick=function(){
3 q7 D' C' L" Q# c! M- r5 @
console.log(audio.loop: +audio.loop);
- G& \% d" x1 F/ k: F5 a$ N. \
};
+ y( f) d* n7 I. o
// preload metadata
2 d; }7 ~: m1 R u0 \
document.getelementbyid(preload_metadata).onclick=function(){
0 M+ y* @& B% j; s5 F/ }& @
audio.preload=metadata;
# @& d% D5 C K _- ^
updatepreload();
" G# d" H; K, N& }1 k" }6 {6 D
console.log(preload metadata);
! E$ S+ b( }3 x( A1 p5 ^+ Q# O
};
' u- x$ g1 s: {1 k
// get preload
3 Q2 E" g8 o: |7 p
document.getelementbyid(get_preload).onclick=function(){
# ~' G% H% ]/ S+ A/ ~
console.log(audio.preload: +audio.preload);
, v5 c; z5 J$ a# S) i$ P7 M6 A
};
0 j( Q" C, m# E' z
// get defaultmuted
6 ^+ F# T' K i; l* l" |7 ~. g
document.getelementbyid(get_default_muted).onclick=function(){
4 ~. n0 Z& v3 m0 B1 \ G- V/ I
console.log(audio.defaultmuted: +audio.defaultmuted);
& D* @0 j1 {2 a$ \9 D- Z @, d
};
" }8 o4 w/ P3 Z; ^ t
// mute
/ e* U! L( G0 y+ }4 [$ M
document.getelementbyid(mute).onclick=function(){
8 T3 T w, \6 l% F
audio.muted=true;
9 ?5 D- r& o) r) u
updatemuted();
9 F" ~5 x3 _2 |2 X: b
console.log(audio mute);
% a& f% A" X5 \) U% E7 D7 U
};
& ^- j5 Q# G. U: h+ T
// unmute
L$ m0 h5 b0 l6 G5 ]
document.getelementbyid(unmute).onclick=function(){
0 I2 S1 L9 s' x# }. X9 d* L3 b4 \6 k
audio.muted=false;
4 i# h: d4 n: M3 M/ S) {- Z
updatemuted();
8 I7 \+ ]$ ]3 ]: J
console.log(audio unmute);
$ w1 @8 `7 }1 Z6 M- B' W
};
* S9 I% j# A ~! b% U. n
// get muted
) l0 Q+ Y; x. t- H3 }7 M9 {
document.getelementbyid(get_muted).onclick=function(){
9 t/ }; y4 O& w7 \3 U$ L& r$ X% |
console.log(audio.muted: +audio.muted);
4 `1 z8 v4 S4 {% u3 K7 G
};
% ]/ B- a/ ~; J1 G+ t h
// get defaultplaybackrate
! e" G: A6 f9 X/ w" L$ |
document.getelementbyid(get_default_playback_rate).onclick=function(){
' ~" e( {, `/ n2 |3 {
console.log(audio.defaultplaybackrate: +audio.defaultplaybackrate);
' n2 A1 Q$ ^, y. q; Y' C6 E; v. w
};
2 @5 X" B H" T* `! R/ l
// set playbackrate-
# K! ]' O$ U0 S1 Y4 k6 i
document.getelementbyid(playback_rate_down).onclick=function(){
7 O, F+ j, P% b% ^/ @( f
audio.playbackrate-=0.2;
% l9 \% C5 h+ X6 T3 M
console.log(playbackrate-0.2);
# H$ ]4 C3 I1 f4 ~+ O
};
) e1 G" F* O9 x. W! ^
// set playbackrate+
/ t2 v7 l1 T+ ^7 v& V! {8 E8 r
document.getelementbyid(playback_rate_up).onclick=function(){
1 Q) o( K, g2 o- X, v3 Z" g
audio.playbackrate+=0.2;
$ _) A5 Q! s8 h8 C& z
console.log(playbackrate+0.2);
W+ f) g5 l3 y7 t1 P$ n B- o
};
$ e2 `2 O" W# H7 X0 m( e) ^' l
// get playbackrate
9 h4 k! H5 K4 s
document.getelementbyid(get_playback_rate).onclick=function(){
5 N3 f+ V- i: D# b& @7 ^/ V+ S$ u
console.log(audio.playbackrate: +audio.playbackrate);
, M, A$ I3 k+ a8 h" j
};
+ h. a7 c s- w& f4 W1 F
// get networkstate
[( U& i/ @8 f% }
document.getelementbyid(get_network_state).onclick=function(){
% y0 J3 l/ z2 n1 g, z
console.log(audio.networkstate: +audio.networkstate);
( w* f$ D+ ~( f. \
};
' d- ]* P: d0 J; C$ n; _. i4 g
// get readystate
0 T1 G2 A5 d4 w8 ~! z
document.getelementbyid(get_ready_state).onclick=function(){
3 x+ D) A6 U. J3 z) p
console.log(audio.readystate: +audio.readystate);
% ]. {: d+ V) |' |7 L8 K/ V
};
' f+ S! b8 g2 W, P) H: T& @
// get buffered
! `- v4 c( { T) v. y" _! A; e; s
document.getelementbyid(get_buffered).onclick=function(){
$ Y& c( V8 @1 ^' q% ~
console.log(audio.buffered:);
/ O% f1 ~0 I+ Z+ I9 `
var ranges=audio.buffered;
& c( @" O' E1 Y6 q' O% L
var n=ranges.length;
( x3 M3 ]" w4 ~0 d# {% B
for(var i=0;i<n;i++){
/ [2 _, w+ X+ F* c- O6 S4 x+ |
console.log((+ranges.start(i)+,+ranges.end(i)+));
) `" c# b8 @8 S
}
) [0 Y a) c. Y% g8 q0 F
};
$ v. |$ \0 f8 {7 f' m
// get seekable
5 O# u' [* Y& [! n- F, K3 M" W5 p; M7 m
document.getelementbyid(get_seekable).onclick=function(){
; ~7 I% a) l& r. m2 d# u# n2 F0 o3 l
console.log(audio.seekable:);
& p7 g# P+ L6 w% q
var ranges=audio.seekable;
! m5 M9 R' U! A; |: I l2 ?. J
var n=ranges.length;
; [4 ]1 j* U" G- }
for(var i=0;i<n;i++){
2 h* g% |. S9 A# R2 ~. M
console.log((+ranges.start(i)+,+ranges.end(i)+));
" E. v# V& Y+ ~8 V2 R8 {$ k
}
0 A" f% B7 ?$ i4 t Y) ^. Z# N% z
};
0 Y/ D$ s/ `; q
// dom events
3 l) A6 {( L) z
// abort
9 b2 j* c7 V! }# R" e
audio.addeventlistener(abort,function(){
7 K: Y/ Y2 v4 j( k) G7 c
console.log(event:abort);
a& v. s' i+ A" y5 j2 W! C
});
% g" m2 k/ o4 W) X, d) O
// canplay
1 {3 @# |" ]8 w( R; H, n7 S* }8 A2 w( M
audio.addeventlistener(canplay,function(){
: W) \8 o7 g2 D9 T6 K9 t
console.log(event:canplay);
1 u8 R1 n* N( F
});
& g1 \0 U3 b! z; W
// canplaythrough
: j% U3 m) k, }) j1 b
audio.addeventlistener(canplaythrough,function(){
! T/ p2 s2 ?% x* G2 q
console.log(event:canplaythrough);
8 z8 o. p% @/ q4 d, @& a) {
});
( L i5 I% n- U8 z4 t$ C
// durationchange
! w8 n5 f' u* L; e- B( e: H
audio.addeventlistener(durationchange,function(){
6 ]4 M' L, `8 R; G5 E
updateduration();
5 D) j, J) e M9 v
console.log(event:durationchange);
/ V2 T+ V3 C0 J. u5 P, S% b1 \
});
+ T, c) Z1 d& S( h. m* P8 `
// emptied
9 R; ]' j# S: ?5 t$ N9 t9 i
audio.addeventlistener(emptied,function(){
0 r) z5 T1 Q3 q7 i7 C
updatesrc();
t @% m; p& V+ g2 x @. Q
updatecurrentsrc();
7 P2 m6 a U# z2 A% q/ b: ^6 M* z
updateduration();
, S! W- |% z9 k* H# h; p3 b
updatepaused();
5 o" H! c$ m2 @3 `* l6 M
updatenetworkstate();
/ M# i) a0 p( E+ x9 K Y
updatereadystate();
6 k* G7 D- X6 p
updatebuffered();
, b6 Z1 ]+ F9 r: a' u
updateseekable();
" f$ Y) i2 {0 ^8 P7 H# S/ v
updateplayed();
" U) g6 y, e1 z9 _: b/ V. M
console.log(event:emptied);
$ X; H3 m! e, v b$ |
});
2 {9 X4 s. E% w% L
// ended
( V& k# d# L0 E: X1 n# k* m
audio.addeventlistener(ended,function(){
3 j' Q( u0 q5 }2 _
updateended();
+ m+ n% J% K- A
console.log(event:ended);
- o' m7 n' I& n3 {
});
' Z, V3 z% F( O! q h. H
// loadeddata
8 H; T# N! @$ \/ p
audio.addeventlistener(loadeddata,function(){
" |. h1 {$ {4 t7 r1 [
updatenetworkstate();
+ X' [) t6 a' E5 \0 w
updatereadystate();
4 |8 A) B7 {8 E$ C' o1 G* }, m
updatebuffered();
2 ?! X8 ~. d9 s2 C* y6 e
updateseekable();
, T Z. T0 P6 h7 H
console.log(event:loadeddata);
' Z1 i. f4 n! {; I* ~
});
/ g0 R0 s2 `' e8 f7 x
// loadedmetadata
/ x* N/ c9 W: z ?4 a* h$ s
audio.addeventlistener(loadedmetadata,function(){
; l; C$ f, K6 C" W2 J% Q5 M
console.log(event:loadedmetadata);
( [1 t9 I7 e, O- {# n0 t5 ]
});
" q$ |; @0 m8 [- i( _( Y
// loadstart
. M' G! L$ [* H, u
audio.addeventlistener(loadstart,function(){
1 m; P: z4 C% s- p8 v5 U* S- W
console.log(event:loadstart);
( P6 L( g/ R" |0 E# Q4 U2 L4 C& w
});
! B, W: S2 |2 \8 `& D7 @7 k) I( W
// pause
, P! B, t9 b/ e' C' t% w
audio.addeventlistener(pause,function(){
1 F7 J( }2 P7 x' m, ]. l
updatepaused();
3 m- ?5 a+ v: I* G7 k0 \" B
console.log(event:pause);
9 z. x& B) ` W g# Q
});
% K0 Y$ q$ v2 G( i6 M7 G$ r, x7 J
// play
6 E) T1 h2 V p% v( H- ~8 [
audio.addeventlistener(play,function(){
4 u9 q6 S% Y' O& r
updatepaused();
: o) e6 |1 a/ P7 ^8 W0 ]
console.log(event:play);
7 N- Y' \, b/ t
});
( Z# ^# F8 g- N6 o
// playing
* x' w1 V6 `" q1 c4 o& ]
audio.addeventlistener(playing,function(){
; T, c) A% a( J: m
console.log(event:playing);
% Y8 B$ o" d: b4 i
});
; K0 [" d6 h7 x' z
// progress
1 d$ K' R. t% f) c+ Q
audio.addeventlistener(progress,function(){
# A9 ~9 Q* Y& J8 j
updatenetworkstate();
( T; R \7 [9 V. Y6 p
updatereadystate();
! x2 Z5 f6 k; S" ~! O
updatebuffered();
! s! ?' I5 l. C, o/ i9 }
updateseekable();
7 M2 ?& H' z# E& X# Y9 O1 f
console.log(event:progress);
) H' r7 G/ l2 `* M3 e& R
});
) w0 j6 o" I4 [% e* y* Y' R3 r
// ratechange
4 ]# V: L! V# S( z' I/ s' f
audio.addeventlistener(ratechange,function(){
$ J3 a1 U5 E% ` m6 L* g
updateplaybackrate();
3 p1 `% b& q9 D5 M, _
console.log(event:ratechange);
* Y- ^' q( v; ~' e* N' K5 u* [
});
+ X3 A. }, o9 k) V
// seeked
5 j. l. j) V1 R( {
audio.addeventlistener(seeked,function(){
) v8 v' P$ }1 {& ]; {* g
console.log(event:seeked);
- {, U- E; z" [- l: o# W
});
$ p1 c8 l6 D9 `: f z5 i3 ]
// seeking
( r7 u: R& Q; u% l- i" v
audio.addeventlistener(seeking,function(){
' h0 u- _) ?# q( G1 P5 Y/ z
console.log(event:seeking);
, J- W0 E: I* J# H( e
});
/ l* ?4 A! ~' @
// stalled
) @8 R2 Y/ j4 z* C, ?1 v
audio.addeventlistener(stalled,function(){
j& Q/ u' T' l# Z' p5 e8 g
console.log(event:stalled);
b4 X" J7 y5 z; \! ^
});
+ O# ]8 V6 E8 S, x- u5 k
// suspend
7 m3 V! F; ^) P" P4 |$ E6 U' w8 e
audio.addeventlistener(suspend,function(){
) |( W$ d7 p/ n& F' V' W- A* J5 {0 s
console.log(event:suspend);
9 @. G6 [6 ~! f( j/ M; r3 N9 n5 a
});
, l8 j1 c& z. M# i) ~% [
// timeupdate
' R1 L9 v: h' C7 G, ]- v' j( \
audio.addeventlistener(timeupdate,function(){
7 O" }2 n$ Y& }; }0 z- k/ O
updatecurrenttime();
) r U2 |2 c' Q% W
updateended();
! @( R8 d* n. J! C( [" n8 k
updateplayed();
6 F/ L* n+ X/ v6 K
console.log(event:timeupdate);
, T$ ]% o: i* E0 f- i" q/ H! [5 d! F
});
4 O8 H( s( p" i$ b
// volumechange
6 \, v+ G- X+ k7 v, C F+ k
audio.addeventlistener(volumechange,function(){
9 g9 b8 p1 x! @
updatevolume();
9 c: T* j1 O T; b# J/ S
console.log(event:volumechange);
9 @4 ~2 ^$ q( |
});
2 |9 }$ `! z. }
// waiting
9 U7 g; S7 ~6 u1 b- }1 A
audio.addeventlistener(waiting,function(){
( D$ x. H$ O* a' l. a
console.log(event:waiting);
4 a1 p2 E# B6 b5 Q
});
X! k" \8 N7 e! ^7 a! [
updateautoplay();
+ |$ n; A* b' R
updatecontrols();
" c3 V: V5 D1 y
updatedefaultmuted();
, T. K3 b0 ~+ S2 a7 e, {2 e
updatedefaultplaybackrate();
, r8 B4 t9 S$ |! X3 c2 u# D1 w
updateloop();
4 ]' `1 K8 \7 r4 t% P
updatepreload();
7 a8 b) ^8 z/ E- V3 m6 d
updatesrc();
, L9 L7 C5 O- q/ f
updatecurrentsrc();
' t8 f( k3 K( r6 T/ ?
updateduration();
+ p4 q6 m, ?) R! C: U5 q
updatecurrenttime();
$ Q, J* Q+ M8 q" p6 ^
updatevolume();
H2 n5 H1 F8 x/ e' [
updatepaused();
, m/ _# |9 l6 Y$ @" n$ b
updatemuted();
; E% \2 Z: L6 Z# B1 o$ d9 C
updateended();
. X( h3 w5 A v9 Z& z- o# ]
updateplaybackrate();
3 y" q9 x0 W; c( D9 \& M% V
updatenetworkstate();
9 ]: g3 \- |5 \- ]* w! u/ j
updatereadystate();
; g. ~8 Y$ H: k; N
updatebuffered();
9 W3 {5 R4 e/ U9 q% K6 C+ s9 n
updateseekable();
v& R7 N5 H" G& |# \5 }
updateplayed();
$ p+ j: z8 \2 C+ @$ I- |
updateerror();
5 _4 e' |9 w$ @4 o2 y) i6 J* E
};
& L2 e% T/ i; H. a8 ^3 J
// functions to update info table
8 A ^1 |; ^: {. q( U- }
// autoplay
& O. D$ ]: M, ?
function updateautoplay(){
! y6 Y5 x5 q2 ^! U
document.getelementbyid(autoplay).innerhtml=audio.autoplay;
1 y3 o5 [2 ^2 V
}
% K. u$ ?% R. g3 U/ R( y
// controls
& ]0 y- Z- ]7 x9 k
function updatecontrols(){
1 _4 F$ e% J* k/ d; r" E7 ~3 u
document.getelementbyid(controls).innerhtml=audio.controls;
F3 n3 O, L4 N0 h' W, c' i
}
' l/ A) z! Z7 C9 N1 s
// defaultmuted
. T( v R8 W7 L6 q3 L5 n7 `9 t2 O) s
function updatedefaultmuted(){
l* p- a6 E L9 m6 P* ]! a. j
document.getelementbyid(default_muted).innerhtml=audio.defaultmuted;
5 [" V; T( @9 G4 S5 x4 r' g2 v. V
}
, L( H& I) q. z/ Y: h
// defaultplaybackrate
9 B% h* b3 W% {! T
function updatedefaultplaybackrate(){
- A0 K# |* N- X% }* q* l$ s7 s
document.getelementbyid(default_playback_rate).innerhtml=audio.defaultplaybackrate;
5 X" P7 Q Z; N$ Z1 M
}
8 F( H8 a# W& A* ?; O+ N* |* b
// loop
4 Q$ f3 _* W E$ E8 h, ~ j
function updateloop(){
- [* U4 |. y/ N& v
document.getelementbyid(loop).innerhtml=audio.loop;
5 E, R2 F$ o( K. M- I5 j9 q
}
0 c0 Z% r2 e! {1 a( D
// preload
% r) b' |+ h5 b# B! a& R7 b
function updatepreload(){
; w m9 k1 ]/ a/ Z
document.getelementbyid(preload).innerhtml=audio.preload;
' L* ^& }5 ]9 d l
}
* Q! d( `! N" K' f
// src
# U' O. ]4 u% d3 a+ u& x3 [# y# R+ g t
function updatesrc(){
2 W3 i0 R w" v" n+ H8 @
document.getelementbyid(src).innerhtml=audio.src;
7 ?6 X' b: K/ U: U z; s
}
9 ?. g1 B( X* B) A4 I
// currentsrc
+ Z# H! V7 x/ q7 H9 ?8 R& U: P: r
function updatecurrentsrc(){
! F5 D' j/ [* }. T
document.getelementbyid(current_src).innerhtml=audio.currentsrc;
) o& ^! Q) c |, y& a/ _
}
8 K0 V3 ?9 q9 r& ^/ b5 L; h. `
// duration
, i! C% `" z% Q- I
function updateduration(){
! `6 U( v! }7 Y2 [' k( n3 p' I
document.getelementbyid(duration).innerhtml=audio.duration;
5 S4 ` \- _0 m! i4 r
}
* J6 X% F" M* y( o4 b3 n
// currenttime
9 }- X2 W* M B; D* m u2 a) L7 C
function updatecurrenttime(){
+ \& u5 B& n5 C$ w
document.getelementbyid(current_time).innerhtml=audio.currenttime;
9 u; H, H2 a0 L
}
) Y/ R0 F1 ~2 ^1 ] Y( p0 s3 S" _
// ended
9 F9 O$ E" x3 i4 K
function updateended(){
& p6 o9 K; e: k5 E% }
document.getelementbyid(ended).innerhtml=audio.ended;
. V6 i* }6 K: N$ u1 t% F- Z5 M/ e
}
5 E6 O( \9 |; O+ ^1 m) s7 P; X( o" p5 v
// paused
! k2 z7 `' n0 }; b" b" ?2 o# w# K
function updatepaused(){
! C/ P7 M! ]8 {5 D* H
document.getelementbyid(paused).innerhtml=audio.paused;
" f7 J, M: }" S' G5 O+ y- B6 T
}
) T! k6 [) O( x6 I5 F6 g# [' i
// muted
) J3 i' A* ^7 A8 Q% t) C
function updatemuted(){
- w* U" n1 h; w$ |
document.getelementbyid(muted).innerhtml=audio.muted;
5 P7 n, J0 T! j, ]+ F
}
5 T+ L+ o! F0 C- ^( I' n! n
// volume
" n/ t) }' v& C/ J6 K9 m
function updatevolume(){
8 e2 Z5 d; n: g d
document.getelementbyid(volume).innerhtml=audio.volume;
9 U# H# _+ }5 ^5 C
}
x# X: @9 l/ s
// playbackrate
, J* j. f/ {( |5 J. Q
function updateplaybackrate(){
# }- S( j" Q& N0 A& _
document.getelementbyid(playback_rate).innerhtml=audio.playbackrate;
& [$ U7 `- I. O/ h3 y4 p! i
}
) K5 z- M8 F& h u; R
// networkstate
( B2 E, S l. R {! s
function updatenetworkstate(){
0 Z! u' ?, B* m- T
document.getelementbyid(network_state).innerhtml=audio.networkstate;
4 c" m' f% d( M/ f* F e
}
4 {8 A3 u# @' e0 D
// readystate
3 O: l [4 }8 E1 C1 `
function updatereadystate(){
5 w, C8 Y$ |5 V. g
document.getelementbyid(ready_state).innerhtml=audio.readystate;
" @6 d$ M j1 i, g
}
# z: t* Q) }0 l7 M% t
// buffered
2 n+ I- P- g- F6 C% m
function updatebuffered(){
o3 D$ g' Y* P
var ranges=audio.buffered;
- x" O4 o- e- H' i2 y$ Q/ u
var str=;
& j; b! W) T a }. h+ i- ?
var n=ranges.length;
& |' |8 K9 z* c7 \
for(var i=0;i<n;i++){
* T |6 D$ V3 H8 ?3 j$ r, Y
str+=(+ranges.start(i)+,+ranges.end(i)+);
2 A) [# {+ v& P: I$ j6 |
if(i!=n-1){
- m! l4 R! i' K2 Q; Y. h
str+=
2 @/ a8 Y O: O" D* I/ _
;
3 I8 |! {$ z& a0 s3 m
}
. s- }3 Y$ Q* C* z, I* l2 b* Z
}
' W2 b- k4 s# G1 K- I( f
document.getelementbyid(buffered).innerhtml=str;
* ~9 V5 C* @* _1 q$ N- @5 W
}
9 Y% z6 F9 `" T5 T
// seekable
# r5 n& V0 p3 t; s/ f
function updateseekable(){
. G! |6 z# F/ I$ y2 o( k1 b
var ranges=audio.seekable;
9 Q' E& @ |1 J; m6 |2 K/ r6 z
var str=;
6 G; h; X. A" s) k
var n=ranges.length;
" h# Z- }% y, w4 h
for(var i=0;i<n;i++){
6 D* b0 u1 d$ y4 Y4 \. d
str+=(+ranges.start(i)+,+ranges.end(i)+);
, C- C' p/ z: S |- }" z4 W. T
if(i!=n-1){
% G' d; v3 r& Z2 `) m& b; ?
str+=
" @5 z& o# Z0 n2 V& N$ ^3 r o+ e' E- o
;
3 @$ P% p) d! a
}
" d0 ?. y3 i6 n$ H7 M$ q1 I$ D
}
% q6 n5 {8 w$ P- a
document.getelementbyid(seekable).innerhtml=str;
?0 m* I5 S6 r9 u
}
' {! r/ F( V7 V( z! s- p8 H
// played
$ _. ]7 b# V k" s; a2 }
function updateplayed(){
: e0 X3 e* V5 V; }; s
var ranges=audio.played;
$ Y/ N5 r2 q" Y9 F, v- M. w. n
var str=;
8 y2 f2 ]- X5 a7 d' d+ u L |" [
var n=ranges.length;
+ M! b+ i; }) Q/ u5 P5 l) x6 r
for(var i=0;i<n;i++){
8 r L' A/ A! @ m2 g0 j
str+=(+ranges.start(i)+,+ranges.end(i)+);
! [! u; ~; N8 J
if(i!=n-1){
. K. \- R1 {$ ^ _+ A6 B! c1 R
str+=
6 i4 i+ m; G$ F6 I1 O
;
* z6 N/ P$ z6 _! j3 g/ G o2 C8 a( q. @
}
, H0 @: s$ h3 }/ b% c3 g( U; I
}
% g& x+ u! r$ I
document.getelementbyid(played).innerhtml=str;
1 H9 i* {: V" t( M1 w. @% ?
}
) w. P: n' h5 x0 V: p
// error
6 E* E9 J& |5 a% e
function updateerror(){
( _* x! R3 R, t
document.getelementbyid(error).innerhtml=audio.error;
+ W k- }1 j, y. \
}
% x# I/ |# X s# q, c: N
; Q. {! W! _+ o; l
更多网页制作信息请查看: 网页制作
作者:
gevaemaidovef
时间:
2015-11-4 20:27
命不能争,运可以造,弱者认命,强者抗命,能者求命,智者造命。
作者:
seazvyt
时间:
2015-11-4 20:27
哎 怎么说那~~
作者:
alapScady
时间:
2015-11-4 20:28
来电来函..欢迎洽购...
作者:
gevaemaidovef
时间:
2015-11-4 20:28
疯了.........
作者:
effoggikeftor
时间:
2016-2-28 22:44
说嘛1~~~想说什么就说什么嘛~~
作者:
wwzcdenleclv
时间:
2016-2-28 22:45
真的 好久都没有这么笑了~ 好开心哦
作者:
gevaemaidovef
时间:
2016-2-28 22:45
今天统计好像出了问题
作者:
GoodyFouppy
时间:
2016-2-28 22:45
因删贴不及时所产生的任何法律(书法,基本法,劳动法,婚姻法,输入法,国际法,今日说法,与台湾关系法及文中涉及或可能涉及以及未及之法,各地治安管理条例)纠纷或责任本人概不负责。
欢迎光临 得知互动 (https://bbs.dezhifl.com/)
Powered by Discuz! X5.0