正在显示
9 个修改的文件
包含
25 行增加
和
7 行删除
@@ -259,6 +259,13 @@ if [ $SRS_HLS = YES ]; then | @@ -259,6 +259,13 @@ if [ $SRS_HLS = YES ]; then | ||
259 | ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/players && | 259 | ln -sf `pwd`/research/players ${SRS_OBJS}/nginx/html/players && |
260 | rm -f ${SRS_OBJS}/nginx/crossdomain.xml && | 260 | rm -f ${SRS_OBJS}/nginx/crossdomain.xml && |
261 | ln -sf `pwd`/research/players/crossdomain.xml ${SRS_OBJS}/nginx/html/crossdomain.xml | 261 | ln -sf `pwd`/research/players/crossdomain.xml ${SRS_OBJS}/nginx/html/crossdomain.xml |
262 | + | ||
263 | + # override the default index. | ||
264 | + cat <<END > ${SRS_OBJS}/nginx/html/index.html | ||
265 | + <script type="text/javascript"> | ||
266 | + window.location.href = "players/index.html"; | ||
267 | + </script> | ||
268 | +END | ||
262 | fi | 269 | fi |
263 | 270 | ||
264 | if [ $SRS_HLS = YES ]; then | 271 | if [ $SRS_HLS = YES ]; then |
@@ -15,7 +15,9 @@ | @@ -15,7 +15,9 @@ | ||
15 | </style> | 15 | </style> |
16 | <script type="text/javascript"> | 16 | <script type="text/javascript"> |
17 | $(function(){ | 17 | $(function(){ |
18 | - srs_init(null); | 18 | + update_nav(); |
19 | + | ||
20 | + window.location.href = "srs_player.html"; | ||
19 | }); | 21 | }); |
20 | </script> | 22 | </script> |
21 | </head> | 23 | </head> |
1 | +////////////////////////////////////////////////////////////////////////////////// | ||
2 | +////////////////////////////////////////////////////////////////////////////////// | ||
3 | +////////////////////////////////////////////////////////////////////////////////// | ||
1 | /** | 4 | /** |
2 | * padding the output. | 5 | * padding the output. |
3 | * padding(3, 5, '0') is 00003 | 6 | * padding(3, 5, '0') is 00003 |
@@ -112,6 +115,10 @@ function srs_init(rtmp_url, hls_url, modal_player) { | @@ -112,6 +115,10 @@ function srs_init(rtmp_url, hls_url, modal_player) { | ||
112 | ////////////////////////////////////////////////////////////////////////////////// | 115 | ////////////////////////////////////////////////////////////////////////////////// |
113 | /** | 116 | /** |
114 | * the SrsPlayer object. | 117 | * the SrsPlayer object. |
118 | +* @param container the html container id. | ||
119 | +* @param stream_url the url of stream, rtmp or http. | ||
120 | +* @param width a float value specifies the width of player. | ||
121 | +* @param height a float value specifies the height of player. | ||
115 | */ | 122 | */ |
116 | function SrsPlayer(container, stream_url, width, height) { | 123 | function SrsPlayer(container, stream_url, width, height) { |
117 | if (!SrsPlayer.__id) { | 124 | if (!SrsPlayer.__id) { |
@@ -275,3 +282,8 @@ function __srs_on_player_timer(id, time, buffer_length) { | @@ -275,3 +282,8 @@ function __srs_on_player_timer(id, time, buffer_length) { | ||
275 | 282 | ||
276 | player.on_player_timer(time, buffer_length); | 283 | player.on_player_timer(time, buffer_length); |
277 | } | 284 | } |
285 | + | ||
286 | +////////////////////////////////////////////////////////////////////////////////// | ||
287 | +////////////////////////////////////////////////////////////////////////////////// | ||
288 | +////////////////////////////////////////////////////////////////////////////////// | ||
289 | + |
@@ -85,9 +85,6 @@ package | @@ -85,9 +85,6 @@ package | ||
85 | if (!flashvars.hasOwnProperty("id")) { | 85 | if (!flashvars.hasOwnProperty("id")) { |
86 | throw new Error("must specifies the id"); | 86 | throw new Error("must specifies the id"); |
87 | } | 87 | } |
88 | - if (!flashvars.hasOwnProperty("on_player_ready")) { | ||
89 | - throw new Error("must specifies the on_player_ready"); | ||
90 | - } | ||
91 | 88 | ||
92 | this.js_id = flashvars.id; | 89 | this.js_id = flashvars.id; |
93 | this.js_on_player_ready = flashvars.on_player_ready; | 90 | this.js_on_player_ready = flashvars.on_player_ready; |
@@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
15 | </style> | 15 | </style> |
16 | <script type="text/javascript"> | 16 | <script type="text/javascript"> |
17 | $(function(){ | 17 | $(function(){ |
18 | - srs_init(null); | 18 | + update_nav(); |
19 | $("#main_frame").attr("src", "http://www.videolan.org/vlc/"); | 19 | $("#main_frame").attr("src", "http://www.videolan.org/vlc/"); |
20 | }); | 20 | }); |
21 | </script> | 21 | </script> |
-
请 注册 或 登录 后发表评论