Menu

[r307]: / trunk / player / StrobeMediaPlayback / html-template / debug.html  Maximize  Restore  History

Download this file

280 lines (262 with data), 11.8 kB

  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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Strobe Media Playback</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="lib/swfobject.js">
</script>
<script type="text/javascript" src="lib/ParsedQueryString.js">
</script>
<script type="text/javascript" src="lib/debug.js">
</script>
<script type="text/javascript">
function loadStrobeMediaPlayback()
{
// Collect query parameters in an object that we can
// forward to SWFObject:
var pqs = new ParsedQueryString();
var parameterNames = pqs.params(false);
var parameters = {
src: "http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m",
autoPlay: false,
controlBarAutoHide: false,
playButtonOverlay: true,
showVideoInfoOverlayOnStartUp: true,
javascriptCallbackFunction: "onJavaScriptBridgeCreated"
};
for (var i = 0; i < parameterNames.length; i++) {
var parameterName = parameterNames[i];
parameters[parameterName] = pqs.param(parameterName) ||
parameters[parameterName];
}
if (parameters.hasOwnProperty("logFilter"))
{
org.osmf.player.debug.filter = parameters.logFilter;
delete parameters.logFilter;
document.getElementById("logFilter").value = org.osmf.player.debug.filter;
}
var wmodeValue = "direct";
var wmodeOptions = ["direct", "opaque", "transparent", "window"];
if (parameters.hasOwnProperty("wmode"))
{
if (wmodeOptions.indexOf(parameters.wmode) >= 0)
{
wmodeValue = parameters.wmode;
}
delete parameters.wmode;
}
// Embed the player SWF:
swfobject.embedSWF(
"StrobeMediaPlayback.swf"
, "StrobeMediaPlayback"
, 640
, 480
, "10.1.0"
, "expressInstall.swf"
, parameters
, {
allowFullScreen: "true",
wmode: wmodeValue
}
, {
name: "StrobeMediaPlayback"
}
);
}
window.onload = loadStrobeMediaPlayback;
var player = null;
function onJavaScriptBridgeCreated(playerId)
{
if (player == null) {
player = document.getElementById(playerId);
// Add event listeners that will update the
player.addEventListener("isDynamicStreamChange", "updateDynamicStreamItems");
player.addEventListener("switchingChange", "updateDynamicStreamItems");
player.addEventListener("autoSwitchChange", "updateDynamicStreamItems");
player.addEventListener("mediaSizeChange", "updateDynamicStreamItems");
}
}
function updateDynamicStreamItems()
{
document.getElementById("dssc").style.display = "block";
var dynamicStreams = player.getStreamItems();
var ds = document.getElementById("dssc-items");
var switchMode = player.getAutoDynamicStreamSwitch() ? "Auto" : "Manual";
var dsItems = '<strong><a href="#" onclick="player.setAutoDynamicStreamSwitch(!player.getAutoDynamicStreamSwitch()); return false;"> Switch Mode: ' + switchMode + '</a></strong><br /><br />\n';
var currentStreamIndex = player.getCurrentDynamicStreamIndex();
for (var idx = 0; idx < dynamicStreams.length; idx ++)
{
var playing = "";
if (currentStreamIndex == idx)
{
playing = "playing";
}
dsItems += '<a href="#" class="' + playing + '" onclick="switchDynamicStreamIndex(' + idx + '); return false;">'
+ dynamicStreams[idx].streamName
+ ' : '
+ dynamicStreams[idx].bitrate
+ "kbps ("
+ dynamicStreams[idx].width
+ "px x "
+ dynamicStreams[idx].height
+ "px)"
+ '</a><br />\n';
}
ds.innerHTML = dsItems;
}
function switchDynamicStreamIndex(index)
{
if (player.getAutoDynamicStreamSwitch())
{
player.setAutoDynamicStreamSwitch(false);
}
player.switchDynamicStreamIndex(index);
}
</script>
<style type="text/css">
<!-- .Verdana {
font-family: Verdana, Geneva, sans-serif;
}
.playing
{
font-weight:bold;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="5">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="5">
<tr>
<td valign="top" width="640" colspan="3">
<div id="StrobeMediaPlayback">
<p>
Alternative content
</p>
</div>
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<div id="dssc" style="display:none">
<h4>Video Quality Control</h4>
<div id="dssc-items">
The available qualities will be loaded once the playback starts...
</div>
</div>
<h4>logs (the last 50 lines). New logs will be displayed if they match:
<input id="logFilter" value="StrobeMediaPlayback" style="width:100%" onclick="org.osmf.player.debug.clickclear(this, org.osmf.player.debug.filter)"
onblur="org.osmf.player.debug.clickrecall(this, org.osmf.player.debug.filter);" onkeypress="org.osmf.player.debug.filter=this.value;"></input></h4>
<div id="logs" title="Logs" class="metrics" style="overflow: auto; height:400px; width:100%;">
</div>
</td>
</tr>
</table>
</td>
<td id="debugConsole" valign="top" width="100%" height="100%" rowspan="4">
<style type="text/css">
table caption {
caption-side: top;
font-size: 1em;
font-style: italic;
font-weight: bold;
text-align: left;
padding: 0.5em 0;
}
table.metrics, table.qosObject, table.metadata {
padding: 10px;
width: 100%;
}
table.metadata {
flow: left;
}
</style>
<div style="position:absolute;right:0px;top:0px;font-size:0.8em">
Press F11 to make the browser window enter/exit full screen.
</div>
<div style="overflow:auto;height:1000px;width:100%">
<table width="100%">
<tr>
<td valign="top">
<table id="KeyStats" class="metrics">
<caption>
Key Statistics
</caption>
</table>
</td>
<td valign="top">
<table id="rendering" class="metrics">
<caption>
Rendering Info
</caption>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table id="ds" class="metrics">
<caption>
Dynamic Streaming Info
</caption>
</table>
</td>
<td valign="top">
<table id="buffer" class="metrics">
<caption>
Buffer Info
</caption>
</table>
</td>
</tr>
<tr>
<td valign="top" id="qosObjects">
<table id="PlaybackOptimizationMetrics" class="qosObject">
<caption>
PlaybackOptimizationMetrics
</caption>
</table>
<table id="StrobeMediaPlayer" class="qosObject">
<caption>
StrobeMediaPlayer
</caption>
</table>
</td>
<td valign="top">
<table id="NetStream" class="qosObject">
<caption>
NetStream
</caption>
</table>
<table id="NetStreamInfo" class="qosObject">
<caption>
NetStreamInfo
</caption>
</table>
</td>
</tr>
<tr>
<td valign="top" id="other">
<!--<table id="AssetMetadata" class="metadata">
<caption>AssetMetadata</caption>
</table>
<table id="PluginResource0" class="metadata">
<caption>PluginResource0</caption>
</table-->
</td>
<td valign="top">
<table id="ResourceMetadata" class="metrics">
<caption>
Resource Metadata
</caption>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.