-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_cloudplayersdk11.html
140 lines (118 loc) · 7.72 KB
/
example_cloudplayersdk11.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<html>
<head>
<title>VXGCloudSDK-Web 3.1.12</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="x-ua-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" id="font-style-css" href="https://fonts.googleapis.com/css?family=Montserrat%3A400%2C700&ver=4.7.6" type="text/css" media="all">
<link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!-- automaticly include: begin -->
<link rel="stylesheet" type="text/css" href="vxgwebsdk/video-js.min.css">
<link rel="stylesheet" type="text/css" href="vxgwebsdk/CloudSDK.min.css">
<script type="text/javascript" src="vxgwebsdk/video.min.js"></script>
<script type="text/javascript" src="vxgwebsdk/webrtc-adapter-latest.js"></script>
<script type="text/javascript" src="vxgwebsdk/CloudSDK.min.js"></script>
<script type="text/javascript">
CloudSDK.flashswf = "vxgwebsdk/video-js-by-vxg-buff200.swf";
</script>
<!-- automaticly include: end -->
<script>
window.sessNameCh = 'example_cloudplayersdk2_ch';
$(document).ready(function () {
try { var sChannel = window.sessionStorage.getItem(window.sessNameCh);
$('#channel').val(sChannel !== null ? sChannel : ''); } catch (e) {}
window.player = new CloudPlayerSDK('player1', {
autohide: 3000,
timeline: true,
calendar: true,
//preferredPlayerFormat: 'html5',
//useOnlyPlayerFormat: 'webrtc', //more powerful than preferredPlayerFormat
disableZoomControl: false,
disableAudioControl: false,
disableGetShot: false,
disableGetClip: false,
//model3d: <custompathformodel.json>
});
function callback_to_update_token() {
window.player.setVSaaSApi("https://fe.vaplatform.ru/",
"Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHNHEzVGd0dVZqa3pXcmJtQ19ueGo1YlZRbWNWVHZzY1p6VWFzVlBLQWZvIn0.eyJleHAiOjE2NjU0OTMzNjIsImlhdCI6MTY2NTQ4MjU2MiwiYXV0aF90aW1lIjoxNjY1NDgxMjU0LCJqdGkiOiIxOTllZTg4NS02NWVmLTQzNWEtYWE3ZC01ZDJkMzEyMTQwNWMiLCJpc3MiOiJodHRwczovL2tleWNsb2FrLnZhcGxhdGZvcm0ucnUvYXV0aC9yZWFsbXMvbWFzdGVyIiwiYXVkIjoibXRzLXByb3ZpZGVyLWZyb250ZW5kIiwic3ViIjoiNGQ3OGIzY2EtMDcwYi00ZDA3LTgzNzYtM2QzYmNiNGI0ZDliIiwidHlwIjoiSUQiLCJhenAiOiJtdHMtcHJvdmlkZXItZnJvbnRlbmQiLCJub25jZSI6Ijc5NTA2NGNjLTNiYTctNDE5NC1hYTAxLTk2Njg2Njk5MTM2ZSIsInNlc3Npb25fc3RhdGUiOiI5MDRhZmViNi0yMWJjLTQ5NTItODIzZi02NjRkMjVhMGY1ZTciLCJhdF9oYXNoIjoiTGFyaHgwdXFsbkpKdkY2TFNCN21QdyIsInNpZCI6IjkwNGFmZWI2LTIxYmMtNDk1Mi04MjNmLTY2NGQyNWEwZjVlNyIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicGhvbmUi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PEIjs6dAvGaXUlGiXAAuSpU90DqsxO25LEOx2yNKd6ljKCa58jAs9Jic39gxKwHaWTWgUgUvG_-rCtZ6M8K0fXpudLhYzbgmC29vpXBgCOS9owOf5L3KsTL5An9d836t40meNOSUgu1WJC9hfYGF33DrOla-MC7P-ieM2cKYxFHRSHCBNfL7xnBAhCMibIm_OLL5lOnO_SrnLNMbkpcDnSfWMmC70XpRJuyDfr8iiqv67_Vorp_PQ",
callback_to_update_token
);
$('#play_channel').unbind().bind('click', function(){
var channelElem = $('#channel');
var channel = channelElem.val();
if (!channel || channel === '') {
channelElem.css('background-color', 'red').focus();
setTimeout(function () {channelElem.css('background-color', '');},200);
return;
}
player.setSource(channel);
try { window.sessionStorage.setItem(window.sessNameCh, channel) } catch(e) { }
});
});
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light navbar-black navbar-toggleable-md fixed-top">
<div class="container">
<a class="navbar-brand" href="#"></a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navigation-menu" aria-controls="navigation-menu" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="navigation-menu">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link" href="index.html#sdk">VXGCloud SDK (3.1.12)</a></li>
<li class="nav-item"><a class="nav-link" href="index.html#examples">Examples</a></li>
</ul>
</div>
</div>
</nav>
<div class="container main-container">
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10 col-md-offset-1">
<h2>Another backend: VSaaS</h2>
<p>
<a href="example_cloudplayersdk_dynamic.html" id="prev_example" class="btn btn-link ">Previous example</a>
<a href="example_cloudstreamersdk1.html" id="next_example" class="btn btn-link ">Next example</a>
</p>
</div>
</div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10 col-md-offset-1">
<div class="form-group">
<label for="cameraID">Access token</label>
<div class="input-group">
<input id="channel" type="text" class="form-control" placeholder="Enter access token" value="">
<span class="input-group-btn">
<button id="play_channel" class="btn btn-default btn-vxg">Play</button>
</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10 col-md-offset-1" style="height: 520px">
<div id="player1"></div>
</div>
</div>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-10 col-md-offset-1" style="height: 50px">
</div>
</div>
</div>
</body>
</html>