add video demo
This commit is contained in:
parent
6d1631586c
commit
cb1024a1f7
3 changed files with 89 additions and 1 deletions
10
demos/video2/index.html
Normal file
10
demos/video2/index.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>OxJS Video Demo</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<script type="text/javascript" src="../../build/Ox.js"></script>
|
||||
<script type="text/javascript" src="js/video.js"></script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
79
demos/video2/js/video.js
Normal file
79
demos/video2/js/video.js
Normal file
|
@ -0,0 +1,79 @@
|
|||
$videos = []
|
||||
|
||||
Ox.load('UI', {
|
||||
debug: true,
|
||||
theme: 'modern'
|
||||
}, function() {
|
||||
|
||||
Ox.UI.$body.css({background: 'rgb(32, 32, 32)'})
|
||||
|
||||
/*
|
||||
Ox.loop(1, 9, function(part) {
|
||||
$videos.push(
|
||||
Ox.VideoPlayer({
|
||||
controlsBottom: ['play', 'timeline', 'position'],
|
||||
controlsTop: ['title'],
|
||||
height: 96,
|
||||
paused: true,
|
||||
title: 'Part ' + part,
|
||||
video: 'http://next.0xdb.org/0090015/96p' + part + '.webm',
|
||||
width: 128
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 8 + (part - 1) * 136 + 'px',
|
||||
top: '8px',
|
||||
border: '1px solid rgb(128, 128, 128)',
|
||||
})
|
||||
.appendTo(Ox.UI.$body)
|
||||
);
|
||||
});
|
||||
*/
|
||||
|
||||
var id = '0090015', parts = 8;
|
||||
|
||||
var id = '0070334', parts = 2;
|
||||
|
||||
var id = '0123755', parts = 2;
|
||||
|
||||
Ox.VideoPlayer({
|
||||
controlsBottom: ['play', 'scale', 'fullscreen', 'timeline', 'position'],
|
||||
controlsTop: ['title'],
|
||||
enableMouse: true,
|
||||
height: 384,
|
||||
paused: true,
|
||||
timeline: 'http://next.0xdb.org/' + id + '/timeline16p.png',
|
||||
title: 'Single-Part',
|
||||
video: 'http://next.0xdb.org/static/' + id + '_96p.webm',
|
||||
width: 512
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: '8px',
|
||||
//top: '112px',
|
||||
top: '8px',
|
||||
})
|
||||
.appendTo(Ox.UI.$body);
|
||||
|
||||
Ox.VideoPlayer({
|
||||
controlsBottom: ['play', 'scale', 'fullscreen', 'timeline', 'position'],
|
||||
controlsTop: ['title'],
|
||||
enableMouse: true,
|
||||
height: 384,
|
||||
paused: true,
|
||||
timeline: 'http://next.0xdb.org/' + id + '/timeline16p.png',
|
||||
title: 'Multi-Part',
|
||||
video: Ox.range(1, parts + 1).map(function(i) {
|
||||
return 'http://next.0xdb.org/' + id + '/96p' + i + '.webm';
|
||||
}),
|
||||
width: 512
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: '528px',
|
||||
//top: '112px',
|
||||
top: '8px',
|
||||
})
|
||||
.appendTo(Ox.UI.$body);
|
||||
|
||||
});
|
|
@ -122,7 +122,6 @@ Ox.VideoElement = function(options, self) {
|
|||
.css({position: 'absolute'})
|
||||
.bind({
|
||||
ended: function() {
|
||||
Ox.print('ENDED', i, item.parts)
|
||||
if (i < item.parts - 1) {
|
||||
setCurrentPart(self.currentPart + 1);
|
||||
self.video.play();
|
||||
|
|
Loading…
Reference in a new issue