Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
liveAssistant_web_demo
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
2017-05-09 17:07:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fcd87d1fabd4f3be67298e78ccf8c1a21cc42708
fcd87d1f
1 parent
35c0e0c3
1.add readonly input for received movie duration
2.add default parameters for demo ss_start and ds_start
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
36 行增加
和
22 行删除
demo.html
demo.html
查看文件 @
fcd87d1
...
...
@@ -137,7 +137,6 @@ a:active {
var
queryParameters
=
new
Array
();
var
flashVars
=
""
;
var
tag
=
""
;
var
url
=
""
;
var
output
;
var
wsState
=
"idle"
;
...
...
@@ -316,7 +315,7 @@ a:active {
info
=
"framerate:"
+
uint32params
[
2
]
+
" duration:"
+
uint32params
[
3
];
writeToScreen
(
info
);
document
.
getElementById
(
"
mov_pos
"
).
value
=
parseInt
(
uint32params
[
3
]);
document
.
getElementById
(
"
duration
"
).
value
=
parseInt
(
uint32params
[
3
]);
info
=
"playpos:"
+
uint32params
[
4
]
+
" filesize:"
+
uint32params
[
5
];
writeToScreen
(
info
);
...
...
@@ -662,6 +661,31 @@ a:active {
output
.
appendChild
(
pre
);
}
function
getExplorerTitle
()
{
var
explorer
=
window
.
navigator
.
userAgent
.
toLowerCase
();
//ie
if
(
explorer
.
indexOf
(
"msie"
)
>=
0
||
explorer
.
indexOf
(
"trident"
)
>
0
)
{
return
"Internet Explorer"
;
}
//firefox
else
if
(
explorer
.
indexOf
(
"firefox"
)
>=
0
)
{
return
"Mozilla Firefox"
;
}
//Chrome
else
if
(
explorer
.
indexOf
(
"chrome"
)
>=
0
)
{
return
"Google Chrome"
;
}
//Opera
else
if
(
explorer
.
indexOf
(
"opera"
)
>=
0
)
{
return
"Opera"
;
}
//Safari
else
if
(
explorer
.
indexOf
(
"Safari"
)
>=
0
)
{
return
""
;
}
return
""
;
}
window
.
onload
=
function
()
{
output
=
document
.
getElementById
(
"output"
);
...
...
@@ -669,23 +693,15 @@ a:active {
document
.
getElementById
(
'websocketURL'
).
value
=
"ws://127.0.0.1:8090"
;
document
.
getElementById
(
'inputURL'
).
value
=
queryParameters
[
'source'
];
document
.
getElementById
(
'embedField'
).
innerHTML
=
tag
;
for
(
var
i
=
1
;
i
<=
10
;
i
++
)
{
var
ids
=
String
(
"sel"
+
i
.
toString
());
document
.
getElementById
(
ids
).
style
.
visibility
=
"hidden"
;
document
.
getElementById
(
ids
).
className
=
"style76"
;
}
var
default_ss_start_param
=
"0,0,"
+
window
.
screen
.
width
+
","
+
window
.
screen
.
height
;
document
.
getElementById
(
'ss_start_input'
).
value
=
default_ss_start_param
;
// mark the entry for that index
if
(
queryParameters
[
'idx'
]
!=
""
)
{
document
.
getElementById
(
"td"
+
queryParameters
[
'idx'
]
).
className
=
"style75"
;
document
.
getElementById
(
"sel"
+
queryParameters
[
'idx'
]
).
style
.
visibility
=
"visible"
;
}
var
window_name
=
document
.
title
+
" - "
+
getExplorerTitle
();
document
.
getElementById
(
'ds_start_window_name'
).
value
=
window_name
;
var
default_ss_start_pos
=
"0,0,"
+
window
.
screen
.
width
+
","
+
window
.
screen
.
height
;
document
.
getElementById
(
'ds_start_coord'
).
value
=
default_ss_start_pos
;
}
function
onJavaScriptBridgeCreated
(
id
){
...
...
@@ -763,9 +779,6 @@ a:active {
javascriptCallbackFunction
:
"onJavaScriptBridgeCreated"
};
tag
=
"<object width='640' height='377' id='StrobeMediaPlayback' name='StrobeMediaPlayback' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ><param name='movie' value='swfs/StrobeMediaPlayback.swf' /> <param name='quality' value='high' /> <param name='bgcolor' value='#000000' /> <param name='allowfullscreen' value='true' /> <param name='flashvars' value= '"
+
flashVars
+
"'/><embed src='swfs/StrobeMediaPlayback.swf' width='640' height='377' id='StrobeMediaPlayback' quality='high' bgcolor='#000000' name='StrobeMediaPlayback' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer' flashvars='"
+
flashVars
+
"' type='application/x-shockwave-flash'> </embed></object>"
;
<!--
For
version
detection
,
set
to
min
.
required
Flash
Player
version
,
or
0
(
or
0.0
.
0
),
for
no
version
detection
.
-->
var
swfVersionStr
=
"10.3.0"
;
<!--
To
use
express
install
,
set
to
playerProductInstall
.
swf
,
otherwise
the
empty
string
.
-->
...
...
@@ -933,7 +946,7 @@ a:active {
<tr>
<td
width=
"35"
colspan=
"2"
><img
src=
"images/spacer.gif"
width=
"20"
height=
"10"
/></td>
<td
colspan=
"3"
><button
type=
"button"
id=
"mov_start"
onclick=
"javascript:onTestClick(this);"
>
mov_start
</button></td>
<td
colspan=
"3"
>
<button
type=
"button"
id=
"mov_seek"
onclick=
"javascript:onTestClick(this);"
>
mov_seek
</button></td>
<td
colspan=
"3"
>
<button
type=
"button"
id=
"mov_seek"
onclick=
"javascript:onTestClick(this);"
>
mov_seek
</button><
input
id=
"duration"
readonly=
"readonly"
size=
"10"
/><
/td>
<td
colspan=
"3"
><button
type=
"button"
id=
"mov_stop"
onclick=
"javascript:onTestClick(this);"
>
mov_stop
</button></td>
</tr>
<tr>
...
...
@@ -1057,8 +1070,8 @@ a:active {
<td
width=
"2%"
align=
"left"
><img
src=
"images/spacer.gif"
width=
"10"
height=
"10"
/></td>
<td
width=
"27%"
align=
"left"
><a
id=
"connectBtn"
onclick=
"javascript:connectLiveServ();"
><img
src=
"images/connect.gif"
width=
"104"
height=
"25"
/></a></td>
<td
align=
"left"
>
</td>
<td
width=
"27%"
align=
"left"
><a
id=
"disconnectBtn"
onclick=
"javascript:disconnectLiveServ();"
><img
src=
"images/disconnect.gif"
width=
"104"
height=
"25"
/>
<td
align=
"left"
>
</td>
<td
align=
"left"
>
</td>
<td
width=
"27%"
align=
"left"
><a
id=
"disconnectBtn"
onclick=
"javascript:disconnectLiveServ();"
><img
src=
"images/disconnect.gif"
width=
"104"
height=
"25"
/>
<td><img
src=
"images/spacer.gif"
width=
"50"
height=
"10"
/></td>
<td
width=
"27%"
align=
"left"
><a
id=
"clearBtn"
onclick=
"javascript:clearOutput();"
><img
src=
"images/clear.gif"
width=
"104"
height=
"25"
/></a></td>
</tr>
</table></td>
...
...
@@ -1071,3 +1084,4 @@ a:active {
<div
id =
output
/>
</body>
</html>
...
...
请
注册
或
登录
后发表评论