mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
override the default nginx page. jump to players page.
This commit is contained in:
parent
66ea34c514
commit
7a21427b10
9 changed files with 25 additions and 7 deletions
|
@ -259,6 +259,13 @@ if [ $SRS_HLS = YES ]; then
|
|||
ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/players &&
|
||||
rm -f ${SRS_OBJS}/nginx/crossdomain.xml &&
|
||||
ln -sf `pwd`/research/players/crossdomain.xml ${SRS_OBJS}/nginx/html/crossdomain.xml
|
||||
|
||||
# override the default index.
|
||||
cat <<END > ${SRS_OBJS}/nginx/html/index.html
|
||||
<script type="text/javascript">
|
||||
window.location.href = "players/index.html";
|
||||
</script>
|
||||
END
|
||||
fi
|
||||
|
||||
if [ $SRS_HLS = YES ]; then
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
srs_init(null);
|
||||
update_nav();
|
||||
|
||||
window.location.href = "srs_player.html";
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* padding the output.
|
||||
* padding(3, 5, '0') is 00003
|
||||
|
@ -112,6 +115,10 @@ function srs_init(rtmp_url, hls_url, modal_player) {
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
* the SrsPlayer object.
|
||||
* @param container the html container id.
|
||||
* @param stream_url the url of stream, rtmp or http.
|
||||
* @param width a float value specifies the width of player.
|
||||
* @param height a float value specifies the height of player.
|
||||
*/
|
||||
function SrsPlayer(container, stream_url, width, height) {
|
||||
if (!SrsPlayer.__id) {
|
||||
|
@ -275,3 +282,8 @@ function __srs_on_player_timer(id, time, buffer_length) {
|
|||
|
||||
player.on_player_timer(time, buffer_length);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
srs_init(null);
|
||||
update_nav();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
Binary file not shown.
|
@ -85,9 +85,6 @@ package
|
|||
if (!flashvars.hasOwnProperty("id")) {
|
||||
throw new Error("must specifies the id");
|
||||
}
|
||||
if (!flashvars.hasOwnProperty("on_player_ready")) {
|
||||
throw new Error("must specifies the on_player_ready");
|
||||
}
|
||||
|
||||
this.js_id = flashvars.id;
|
||||
this.js_on_player_ready = flashvars.on_player_ready;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
srs_init(null);
|
||||
update_nav();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
|
Binary file not shown.
|
@ -15,7 +15,7 @@
|
|||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
srs_init(null);
|
||||
update_nav();
|
||||
$("#main_frame").attr("src", "http://www.videolan.org/vlc/");
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue