| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 5 |
<title>HTML5 MediaElement</title> |
| 6 |
|
| 7 |
<script src="../build/mediaelement.js"></script> |
| 8 |
</head> |
| 9 |
<body> |
| 10 |
|
| 11 |
<h1>MediaElement.js</h1> |
| 12 |
|
| 13 |
<p>This is only the Flash/Silverlight Shim for older browers or browsers without the codec you need. It is not a full player.</p> |
| 14 |
|
| 15 |
<h2>RTMP stream</h2> |
| 16 |
<video width="360" height="203" id="player1" src="rtmp://stream2.france24.yacast.net/france24_live/en/f24_liveen" autoplay="true" type="video/flv" controls="controls"></video> |
| 17 |
|
| 18 |
<input type="button" id="pp" value="toggle" /> |
| 19 |
<span id="time"></span> |
| 20 |
|
| 21 |
<script> |
| 22 |
MediaElement('player1', {success: function(me) { |
| 23 |
|
| 24 |
me.play(); |
| 25 |
|
| 26 |
me.addEventListener('timeupdate', function() { |
| 27 |
document.getElementById('time').innerHTML = me.currentTime; |
| 28 |
}, false); |
| 29 |
|
| 30 |
document.getElementById('pp')['onclick'] = function() { |
| 31 |
if (me.paused) |
| 32 |
me.play(); |
| 33 |
else |
| 34 |
me.pause(); |
| 35 |
}; |
| 36 |
|
| 37 |
}}); |
| 38 |
</script> |
| 39 |
|
| 40 |
</body> |
| 41 |
</html> |