extract the srs.js

pull/133/head
winlin 11 years ago
parent 4400fc8d0b
commit ff4b28f4d4

@ -254,7 +254,8 @@ if [ $SRS_HLS = YES ]; then
html_file=${SRS_OBJS}/nginx/html/forward/live/livestream_sd.html && hls_stream=livestream_sd.m3u8 && write_nginx_html5
# copy players to nginx html dir.
cp research/players ${SRS_OBJS}/nginx/html/ -r
rm -rf ${SRS_OBJS}/nginx/html/players &&
ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/
fi
if [ $SRS_HLS = YES ]; then

@ -7,11 +7,17 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
}
</style>
<script type="text/javascript">
$(function(){
srs_init(null);
});
</script>
</head>
<body>
<div class="navbar navbar-fixed-top">
@ -20,12 +26,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -0,0 +1,40 @@
function update_nav() {
$("#nav_srs_player").attr("href", "srs_player.html" + window.location.search);
$("#nav_srs_publisher").attr("href", "srs_publisher.html" + window.location.search);
$("#nav_srs_bwt").attr("href", "srs_bwt.html" + window.location.search);
$("#nav_jwplayer6").attr("href", "jwplayer6.html" + window.location.search);
$("#nav_osmf").attr("href", "osmf.html" + window.location.search);
$("#nav_vlc").attr("href", "vlc.html" + window.location.search);
}
function parse_query_string(){
var query_string = String(window.location.search).replace(" ", "").split("?")[1];
if(query_string == undefined){
return {};
}
var queries = query_string.split("&");
var obj = {};
$(queries).each(function(){
var query = this.split("=");
obj[query[0]] = query[1];
});
return obj;
}
function build_default_url() {
var query = parse_query_string();
var port = (query.port == undefined)? 1935:query.port;
var vhost = (query.vhost == undefined)? window.location.hostname:query.vhost;
return "rtmp://"+vhost+":"+port+"/live/livestream";
}
function srs_init(url_obj) {
update_nav();
if (url_obj) {
$(url_obj).val(build_default_url());
}
}

@ -6,6 +6,7 @@
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -15,7 +16,10 @@
<script>jwplayer.key="L1P3Ig76mGOK94gZ9WAAGD+Fb1VCVhoZ/Dm0fg=="</script>
<script type="text/javascript">
$(function(){
$("#txt_url").val("rtmp://"+window.location.hostname+":1935/live/livestream");
// get the vhost and port to set the default url.
// for example: http://192.168.1.213/players/jwplayer6.html?port=1935&vhost=demo
// url set to: rtmp://demo:1935/live/livestream
srs_init($("#txt_url"));
$("#btn_play").click(function(){
$("#main_modal").show(function(){
@ -52,12 +56,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li class="active"><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li class="active"><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -7,6 +7,7 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -14,7 +15,10 @@
</style>
<script type="text/javascript">
$(function(){
$("#txt_url").val("rtmp://"+window.location.hostname+":1935/live/livestream");
// get the vhost and port to set the default url.
// for example: http://192.168.1.213/players/jwplayer6.html?port=1935&vhost=demo
// url set to: rtmp://demo:1935/live/livestream
srs_init($("#txt_url"));
$("#btn_play").click(function(){
$("#main_modal").show(function(){
@ -63,12 +67,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li class="active"><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li class="active"><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -7,6 +7,7 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -14,6 +15,7 @@
</style>
<script type="text/javascript">
$(function(){
srs_init(null);
});
</script>
</head>
@ -24,12 +26,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li class="active"><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li class="active"><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -7,6 +7,7 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -14,6 +15,7 @@
</style>
<script type="text/javascript">
$(function(){
srs_init(null);
});
</script>
</head>
@ -24,12 +26,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active"><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li class="active"><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -7,6 +7,7 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -14,6 +15,7 @@
</style>
<script type="text/javascript">
$(function(){
srs_init(null);
});
</script>
</head>
@ -24,12 +26,12 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li class="active"><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li class="active"><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>

@ -7,6 +7,7 @@
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/srs.js"></script>
<style>
body{
padding-top: 55px;
@ -14,6 +15,7 @@
</style>
<script type="text/javascript">
$(function(){
srs_init(null);
$("#main_frame").attr("src", "http://www.videolan.org/vlc/");
});
</script>
@ -25,19 +27,19 @@
<a class="brand" href="#">SrsPlayers</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li><a href="srs_player.html">SRS播放器</a></li>
<li><a href="srs_publisher.html">SRS编码器</a></li>
<li><a href="srs_bwt.html">SRS测网速</a></li>
<li><a href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a href="osmf.html">AdobeOSMF播放器</a></li>
<li class="active"><a href="vlc.html">VLC播放器</a></li>
<li><a id="nav_srs_player" href="srs_player.html">SRS播放器</a></li>
<li><a id="nav_srs_publisher" href="srs_publisher.html">SRS编码器</a></li>
<li><a id="nav_srs_bwt" href="srs_bwt.html">SRS测网速</a></li>
<li><a id="nav_jwplayer6" href="jwplayer6.html">JWPlayer6播放器</a></li>
<li><a id="nav_osmf" href="osmf.html">AdobeOSMF播放器</a></li>
<li class="active"><a id="nav_vlc" href="vlc.html">VLC播放器</a></li>
</ul>
</div>
</div>
</div>
<div class="container">
<iframe id="main_frame" width="100%" height="800" frameBorder="0"></iframe>
</div>
</div>
<div class="container">
<iframe id="main_frame" width="100%" height="800" frameBorder="0"></iframe>
</div>
</body>

Loading…
Cancel
Save