1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine publisher.

This commit is contained in:
winlin 2015-12-01 10:42:13 +08:00
parent cfe230438a
commit eec2c34b5c

View file

@ -46,6 +46,9 @@
发布地址: 发布地址:
<input type="text" id="txt_url" class="input-xxlarge" value=""></input> <input type="text" id="txt_url" class="input-xxlarge" value=""></input>
<button class="btn btn-primary" id="btn_publish">发布视频</button> <button class="btn btn-primary" id="btn_publish">发布视频</button>
<label class="checkbox">
<input type="checkbox" id="cb_preview" checked>预览
</label>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
@ -446,6 +449,10 @@
info("开始推流到服务器"); info("开始推流到服务器");
srs_publisher.publish(url, vcodec, acodec); srs_publisher.publish(url, vcodec, acodec);
if (!$("#cb_preview").is(":checked")) {
return;
}
if (realtime_player) { if (realtime_player) {
// directly play the url for the realtime player. // directly play the url for the realtime player.
realtime_player.stop(); realtime_player.stop();