mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Detect whether flash enabled for srs-publisher.
This commit is contained in:
parent
b0afc00733
commit
c830dc6700
2 changed files with 265 additions and 207 deletions
|
@ -67,7 +67,6 @@
|
||||||
<input type="text" id="txt_url" class="input-xxlarge" value="">
|
<input type="text" id="txt_url" class="input-xxlarge" value="">
|
||||||
<button class="btn btn-primary" id="btn_play">播放视频</button>
|
<button class="btn btn-primary" id="btn_play">播放视频</button>
|
||||||
<button class="btn" id="btn_generate_link">生成链接</button>
|
<button class="btn" id="btn_generate_link">生成链接</button>
|
||||||
<p></p>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="link_modal" class="modal hide fade">
|
<div id="link_modal" class="modal hide fade">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -260,6 +259,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
<p></p>
|
||||||
<p><a href="https://github.com/ossrs/srs">SRS Team © 2013</a></p>
|
<p><a href="https://github.com/ossrs/srs">SRS Team © 2013</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -31,6 +31,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<div name="detect_flash">
|
||||||
|
<div id="main_flash_alert" class="alert alert-danger fade in hide">
|
||||||
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
|
<strong><span>Usage:</span></strong>
|
||||||
|
<span>
|
||||||
|
请点击下面的图标,启用Flash
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="main_flash_hdr" class="hide">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main_content" class="hide">
|
||||||
<div class="alert alert-info fade in" id="txt_log">
|
<div class="alert alert-info fade in" id="txt_log">
|
||||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||||
<strong><span id="txt_log_title">Usage:</span></strong>
|
<strong><span id="txt_log_title">Usage:</span></strong>
|
||||||
|
@ -261,7 +274,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
<p></p>
|
||||||
<p><a href="https://github.com/ossrs/srs">SRS Team © 2013</a></p>
|
<p><a href="https://github.com/ossrs/srs">SRS Team © 2013</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
@ -276,13 +292,55 @@
|
||||||
<script type="text/javascript" src="js/srs.publisher.js"></script>
|
<script type="text/javascript" src="js/srs.publisher.js"></script>
|
||||||
<script type="text/javascript" src="js/srs.utility.js"></script>
|
<script type="text/javascript" src="js/srs.utility.js"></script>
|
||||||
<script type="text/javascript" src="js/winlin.utility.js"></script>
|
<script type="text/javascript" src="js/winlin.utility.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var __on_flash_ready = null;
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
// 探测Flash是否正常启用。
|
||||||
|
$('#main_flash_hdr').html(
|
||||||
|
'\
|
||||||
|
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="100%" height="100%"> \
|
||||||
|
<param name="movie" value="srs_player/release/srs_player.swf"> \
|
||||||
|
<param name="quality" value="autohigh"> \
|
||||||
|
<param name="swliveconnect" value="true"> \
|
||||||
|
<param name="allowScriptAccess" value="always"> \
|
||||||
|
<param name="bgcolor" value="#0"> \
|
||||||
|
<param name="allowFullScreen" value="true"> \
|
||||||
|
<param name="wmode" value="opaque"> \
|
||||||
|
<param name="FlashVars" value="log=1"> \
|
||||||
|
<param name="flashvars" value="id=1&on_player_ready=__on_flash_ready"> \
|
||||||
|
<embed src="srs_player/release/srs_player.swf" width="100%" height="100%" \
|
||||||
|
quality="autohigh" bgcolor="#0" align="middle" allowfullscreen="true" allowscriptaccess="always" \
|
||||||
|
type="application/x-shockwave-flash" swliveconnect="true" wmode="opaque" \
|
||||||
|
flashvars="id=1&on_player_ready=__on_flash_ready" \
|
||||||
|
pluginspage="http://www.macromedia.com/go/getflashplayer"> \
|
||||||
|
</object> \
|
||||||
|
'
|
||||||
|
);
|
||||||
|
$('#main_flash_hdr').show();
|
||||||
|
|
||||||
|
var showFlashHdr = setTimeout(function(){
|
||||||
|
$('#main_flash_alert').show();
|
||||||
|
}, 300);
|
||||||
|
|
||||||
|
__on_flash_ready = function (id) {
|
||||||
|
clearTimeout(showFlashHdr);
|
||||||
|
|
||||||
|
$('#main_flash_alert').hide();
|
||||||
|
$('#main_flash_hdr').hide();
|
||||||
|
$('#main_content').show();
|
||||||
|
|
||||||
|
autoLoadPage();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var srs_publisher = null;
|
var srs_publisher = null;
|
||||||
var remote_player = null;
|
var remote_player = null;
|
||||||
var realtime_player = null;
|
var realtime_player = null;
|
||||||
|
|
||||||
var query = parse_query_string();
|
var query = parse_query_string();
|
||||||
$(function(){
|
var autoLoadPage = function() {
|
||||||
// get the vhost and port to set the default url.
|
// get the vhost and port to set the default url.
|
||||||
// for example: http://192.168.1.213/players/jwplayer6.html?port=1935&vhost=demo
|
// for example: http://192.168.1.213/players/jwplayer6.html?port=1935&vhost=demo
|
||||||
// url set to: rtmp://demo:1935/live/livestream
|
// url set to: rtmp://demo:1935/live/livestream
|
||||||
|
@ -366,7 +424,7 @@
|
||||||
}
|
}
|
||||||
realtime_player.start();
|
realtime_player.start();
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
function on_publish_stop() {
|
function on_publish_stop() {
|
||||||
if (!srs_can_republish()) {
|
if (!srs_can_republish()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue