|  |  | 
 |  |  |             <div class="row"> | 
 |  |  |                 <div class="row top-buffer"> | 
 |  |  |                     <button id="preview" type="button" class="btn btn-primary">预览</button> | 
 |  |  |                     <button id="previewStop" type="button" class="btn btn-primary">停止</button> | 
 |  |  |                 </div> | 
 |  |  |                 <div class="row top-buffer"> | 
 |  |  |                     <video id="video" muted autoplay loop controls | 
 |  |  | 
 |  |  |             } | 
 |  |  |         }) | 
 |  |  |     }); | 
 |  |  |  | 
 |  |  |     //停止 | 
 |  |  |     $('#previewStop').click(() => { | 
 |  |  |         webrtcClient.stop(); | 
 |  |  |     }); | 
 |  |  |     //云台上下左右 | 
 |  |  |     $("#up").mousedown(function () { | 
 |  |  |         var url = "../cameraSdk/PTZControlWithSpeed"; | 
 |  |  | 
 |  |  |                     } | 
 |  |  |                     // this.eTag = res.headers.get('ETag'); | 
 |  |  |                     this.eTag = res.headers.get("ETag") || res.headers.get('E-Tag'); | 
 |  |  |                     this.wurl = new URL(res.headers.get('location'),  this.wurl.origin).toString(); | 
 |  |  |                     return res.text(); | 
 |  |  |                 }) | 
 |  |  |                 } | 
 |  |  |                 ) | 
 |  |  |                 .then((sdp) => this.onRemoteAnswer(new RTCSessionDescription({ | 
 |  |  |                     type: 'answer', | 
 |  |  |                     sdp, | 
 |  |  | 
 |  |  |  | 
 |  |  |             if (evt.candidate !== null) { | 
 |  |  |                 if (this.eTag === '') { | 
 |  |  |                     console.log("222222222222222222222") | 
 |  |  |                     this.queuedCandidates.push(evt.candidate); | 
 |  |  |                 } else { | 
 |  |  |                     console.log("333333333333333333333") | 
 |  |  |                     this.sendLocalCandidates([evt.candidate]) | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     function realView(whepUrl, videoId) { | 
 |  |  |         console.log(whepUrl) | 
 |  |  |         webrtcClient = new WHEPClient(whepUrl, videoId); | 
 |  |  |     } | 
 |  |  | </script> |