Commit 02f2fdc9 authored by 毛线's avatar 毛线

save

parent 818fda9c
<template> <template>
<video ref="jswebrtc" style="width: 100%;height: 100%;object-fit: fill" @click="(e) => handler().click(e)"/> <video ref="jswebrtc" style="width: 100%;height: 100%;object-fit: fill" webkit-playsinline @click="(e) => handler().click(e)"/>
</template> </template>
<script> <script>
......
...@@ -90,6 +90,9 @@ export default { ...@@ -90,6 +90,9 @@ export default {
init() { init() {
return { return {
play: () => { play: () => {
if (this.isPlay) {
return
}
const url = this.device?.videoMainNumber const url = this.device?.videoMainNumber
const webrtc = `webrtc://eslotstreaming.com${url}` const webrtc = `webrtc://eslotstreaming.com${url}`
this.$refs.webrtc.initVideo(webrtc) this.$refs.webrtc.initVideo(webrtc)
......
...@@ -287,9 +287,7 @@ JSWebrtc.Player = function() { ...@@ -287,9 +287,7 @@ JSWebrtc.Player = function() {
clientip: null, clientip: null,
sdp: offer.sdp sdp: offer.sdp
}; };
console.log("offer: " + JSON.stringify(data));
JSWebrtc.HttpPost(url, JSON.stringify(data)).then(function(res) { JSWebrtc.HttpPost(url, JSON.stringify(data)).then(function(res) {
console.log("answer: " + JSON.stringify(res));
resolve(res.sdp) resolve(res.sdp)
}, function(rej) { }, function(rej) {
reject(rej) reject(rej)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment