-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviedioandaudio.html
79 lines (67 loc) · 2.13 KB
/
viedioandaudio.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test 1 - audio.js</title>
<link href="css/video-js.css" rel="stylesheet">
<script src="script/jquery.min.js"></script>
<script src="script/video.js"></script>
<!-- If you'd like to support IE8 -->
<script src="http://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script>
<link href="css/test.css" rel="stylesheet" type="text/css">
<script src="audiojs/audio.min.js"></script>
<script>
function kk(src){
var s = "<video id='example_video_1' class='video-js vjs-default-skin vjs-big-play-centered' poster='http://vjs.zencdn.net/v/oceans.png' controls preload='auto'><source src=" +src+" type='video/mp4'></video>";
$("#dd").click(function(){
var $vv = $(s);
$("body").append($vv);
var player = videojs('example_video_1');
})
}
$(function(){
kk("video/oceans.mp4")
$("#dd").click(function(){
s = "<p>Load local file</p><audio preload='auto'><source src="+"mp3/aa.mp3"+"></audio>"
var $vv = $(s);
$("body").append($vv);
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
})
})
</script>
</head>
<body>
<!--
<h1>audiojs.createAll()</h1>
<p>Load from remote URL</p>
<audio preload="auto">
<source src="http://cdn02.cdn.gorillavsbear.net/wp-content/uploads/2010/11/gorilla-vs.-bear-november-2010.mp3">
</audio>
-->
<!--
<p>Load local file</p>
<audio preload="auto">
<source src="mp3/aa.mp3">
</audio>
-->
<!--
<p>Load failure (from source)</p>
<audio preload="auto">
<source src="./mp3/juicyz.mp3">
</audio>
-->
<button id="dd">666</button>
<!--
<video id="example_video_1" class="video-js vjs-default-skin" controls autoplay preload="auto" width="640" height="264" poster="http://vjs.zencdn.net/v/oceans.png">
<source src="http://vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
</video>
-->
<!--
<video id="example_video_1" class="video-js vjs-default-skin" controls width="640" height="264">
<source src="video/oceans.mp4" type="video/mp4" />
</video>
-->
</body>
</html>