remove : function

screen-share
Mustafa Yontar 5 years ago
parent 332040e2b9
commit 69e1dfc223
  1. 33
      src/lib/VueJanus.vue

@ -107,14 +107,17 @@
}, },
methods: { methods: {
janusPluginError: function (error) { screenShare () {
},
janusPluginError (error) {
console.log(error) console.log(error)
}, },
consentDialog: function (on) { consentDialog (on) {
// this.$janus.debug("Consent dialog should be " + (on ? "on" : "off") + " now"); // this.$janus.debug("Consent dialog should be " + (on ? "on" : "off") + " now");
console.log(on) console.log(on)
}, },
janusPluginSuccess: function (pluginHandle) { janusPluginSuccess (pluginHandle) {
this.pluginHandle = pluginHandle this.pluginHandle = pluginHandle
this.$janus.log("Plugin attached! (" + this.pluginHandle.getPlugin() + ", id=" + this.pluginHandle.getId() + ")"); this.$janus.log("Plugin attached! (" + this.pluginHandle.getPlugin() + ", id=" + this.pluginHandle.getId() + ")");
this.$janus.log(" -- This is a publisher/manager"); this.$janus.log(" -- This is a publisher/manager");
@ -123,7 +126,7 @@
}, },
initDevices: function (devices) { initDevices (devices) {
console.log(devices) console.log(devices)
devices.forEach(device => { devices.forEach(device => {
if (device.kind === 'videoinput') { if (device.kind === 'videoinput') {
@ -136,18 +139,18 @@
}) })
this.deviceSelectDialog = true this.deviceSelectDialog = true
}, },
genRemoteFeed: function () { genRemoteFeed () {
this.remoteStreams.forEach(item => { this.remoteStreams.forEach(item => {
this.createRemoteFeed(item) this.createRemoteFeed(item)
}) })
}, },
offerSend: function (jsep) { offerSend (jsep) {
console.log('vid offer') console.log('vid offer')
var publish = {"request": "configure", "audio": true, "video": true}; var publish = {"request": "configure", "audio": true, "video": true};
this.pluginHandle.send({"message": publish, "jsep": jsep}); this.pluginHandle.send({"message": publish, "jsep": jsep});
}, },
controlPublishers: function(msg) { controlPublishers(msg) {
msg["publishers"].forEach(item => { msg["publishers"].forEach(item => {
var has = false var has = false
this.remoteStreams.forEach(rm => { this.remoteStreams.forEach(rm => {
@ -159,7 +162,7 @@
}) })
}, },
janusMessage: function (msg, jsep) { janusMessage (msg, jsep) {
console.log(msg); console.log(msg);
var event = msg["videoroom"]; var event = msg["videoroom"];
if (event !== undefined) { if (event !== undefined) {
@ -194,14 +197,14 @@
} }
} }
}, },
onlocalstream: function (stream) { onlocalstream (stream) {
this.mystream = stream this.mystream = stream
console.log(this.$refs) console.log(this.$refs)
console.log(this.$refs["ownstream"]) console.log(this.$refs["ownstream"])
this.$refs.ownstream.srcObject = this.mystream this.$refs.ownstream.srcObject = this.mystream
}, },
restartDevices: function () { restartDevices () {
this.deviceSelectDialog = false this.deviceSelectDialog = false
var media = { var media = {
@ -231,17 +234,17 @@
} }
}) })
}, },
webrtcState: function (on) { webrtcState (on) {
this.$janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now"); this.$janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
}, },
mediaState: function (medium, on) { mediaState (medium, on) {
this.$janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium); this.$janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
}, },
changeDevice: function () { changeDevice () {
this.$refs.ownstream.setSinkId(this.selectedVideo) this.$refs.ownstream.setSinkId(this.selectedVideo)
this.$refs.ownstream.setSinkId(this.selectedAudio) this.$refs.ownstream.setSinkId(this.selectedAudio)
}, },
selectDevice: function () { selectDevice () {
if (!this.started) { if (!this.started) {
console.log(this.selectedVideo) console.log(this.selectedVideo)
console.log(this.selectedAudio) console.log(this.selectedAudio)
@ -257,7 +260,7 @@
this.restartDevices() this.restartDevices()
} }
}, },
janusSuccess: function () { janusSuccess () {
this.opaqueId = "videoroomtest-" + this.$janus.randomString(12); this.opaqueId = "videoroomtest-" + this.$janus.randomString(12);
this.janusInit.attach( this.janusInit.attach(

Loading…
Cancel
Save