forked from jackzhang1204/sewise-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.html
65 lines (64 loc) · 2.13 KB
/
bootstrap.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SewisePlayer</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Launch Player
</button>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div id="player" class="player">
<script type="text/javascript">
</script>
<script type="text/javascript" src="../player/sewise.player.min.js"></script>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var setuped = false;
var isFlash = false;
$('#myModal').on('shown.bs.modal', function(){
$('.player').css('width', $('.modal-dialog').width() + 'px');
$('.player').css('height', $('.modal-dialog').width() / 2 +'px');
if(setuped){
SewisePlayer.doPlay();
}else{
SewisePlayer.setup({
server : "vod",
type : "mp4",
skin : "vodFlowPlayer",
topbardisplay : 'disable',
fallbackurls : {
ogg: "http://jackzhang1204.github.io/materials/mov_bbb.ogg",
webm: "http://jackzhang1204.github.io/materials/mov_bbb.webm"
}
});
setuped = true;
try{
SewisePlayer.toPlay('http://netdisk.foream.cn:8080/netdisk/iface/downloadOpen?fileId=29050&quality=1', 'neurocam wearable camera', 0, true);
}catch(e){
isFlash = true;
};
}
});
$('#myModal').on('hide.bs.modal', function(){
SewisePlayer.doPause();
});
function playerReady(name){
//console.log("Sewise Player On Ready");
if(isFlash){
SewisePlayer.toPlay('http://netdisk.foream.cn:8080/netdisk/iface/downloadOpen?fileId=29050&quality=1', 'neurocam wearable camera', 0, true);
}
}
</script>
<div style="float: left; width: 100%; padding: 10px 30px; "><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fork it on GitHub</a></div>
</body>
</html>