-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathlibde265.html
90 lines (85 loc) · 2.71 KB
/
libde265.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
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>libde265.js</title>
<style type="text/css">
body, button {
font: 13px Helvetica, arial, freesans, clean, sans-serif;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
a {
color: #00a;
}
</style>
<script type="text/javascript" src="../lib/libde265.min.js"></script>
<script>
<!--
var VIDEO_URL = "spreedmovie.hevc";
var player = null;
window.onload = function() {
var video = document.getElementById("video");
var status = document.getElementById("status");
var playback = function(event) {
event.preventDefault();
if (player) {
player.stop();
}
console.log("Playing with libde265", libde265.de265_get_version());
player = new libde265.RawPlayer(video);
player.set_status_callback(function(msg, fps) {
player.disable_filters(true);
switch (msg) {
case "loading":
status.innerHTML = "Loading movie...";
break;
case "initializing":
status.innerHTML = "Initializing...";
break;
case "playing":
status.innerHTML = "Playing...";
break;
case "stopped":
status.innerHTML = "";
break;
case "fps":
status.innerHTML = Number(fps).toFixed(2) + " fps";
break;
default:
status.innerHTML = msg;
}
});
player.playback(VIDEO_URL);
};
var button = document.getElementById("play");
if (button.addEventListener) {
button.addEventListener("click", playback, false);
} else if (button.attachEvent){
button.attachEvent('onclick', playback);
}
};
-->
</script>
<body>
<h1>libde265.js</h1>
<a href="https://github.com/strukturag/libde265.js"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div>
<div>Simple HEVC/H.265 bitstream player in pure JavaScript.</div>
<div><small>Copyright © 2014 by <a href="http://www.struktur.de">struktur AG</a></small></div>
<canvas id="video" width="0" height="0"></canvas>
</div>
<button id="play">Play</button>
<span id="status"></span>
</body>
</html>