winlin

refine publisher.

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