帮助列表 |
<body> <div id="rcs"> </div> <!-- 客户的导入视频弹出框 --> <div class="xcConfirm" id="confirmC" > <div class="xc_layer"></div> <div class="popBox"> <p class="xc_title" >提示信息</p> <div class="txtBox"> <div class="confirm-import" style="display:block;"> <div class='input-group'> <label for="">导入视频 : </label> <input type="text" class="f-pull-input"> <select name="" id="f-address"> </select> </div> </div> </div> <div class="btnArea"> <div class="btnGroup"> <a class="sgBtn cancle" onclick="$('#confirmC').fadeOut()">取消</a> <a class="sgBtn ok" id="confirmC-sure">确定</a> </div> </div> </div> </div> <!-- 弹出框部分 --> </body> <script type="text/javascript" src="https://cdn.aodianyun.com/static/jquery/jquery-1.11.1.min.js"></script> <script src="https://cdn.aodianyun.com/rcs/v1/js/comment.js"></script> |
var hostname="http://*.*.lcps.aodianyun.com";(导播台域名) rcs.Config ( { //认证 // access_id:'{$accessId}', // expires:'{$expires}', // signature:'{$signature}', // signature_nonce:'{$signatureOnce}', //配置 id: "rcs",//html主页面父容器id dialogId:"confirmC",//弹出框id dialogfn:getAddress,//弹出框回调函数 domain:hostname,//导播台域名 示例 http://test.1011.lcps.aodianyun.com 不带端口号 } ); |
rcs.Init(); |
function getAddress() { //导入视频地址函数 $.get( hostname+":3000/getAddress", function(res) { var html = ""; for (var val of res) { html += "<option>" + val + "</option>"; } $('.f-pull-input').val(res[0]); $("#f-address").html(html); }, "json" ); } $("#f-address").change ( function() { $('.f-pull-input').val($(this).val()); } ); $("#confirmC-sure").on ( "click", function() { var val = $(".f-pull-input").val().trim(); if(val!="") { rcs.Pull(val)// 调用pull内置方法 导入视频 } $("#confirmC").fadeOut(); } ) |