diff options
author | lookshe <github@lookshe.org> | 2015-03-19 11:27:22 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2015-03-19 11:27:22 +0100 |
commit | 4487be2f237a51e5ebd78a4c434ed42d41e976d0 (patch) | |
tree | d20c36eea2dcf021b056685807beb79b2813185f | |
parent | 7d78dc663fe8884cbd81844e3e5d7e43bf88f0f8 (diff) |
-set volume of video elements to maximum
-remove video element on call end
-rw-r--r-- | client-website/js/symple.player.webrtc.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client-website/js/symple.player.webrtc.js b/client-website/js/symple.player.webrtc.js index eb57fa7..127f2dc 100644 --- a/client-website/js/symple.player.webrtc.js +++ b/client-website/js/symple.player.webrtc.js @@ -30,7 +30,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ this.rtcConfig = player.options.rtcConfig || { iceServers: [ - { url: "stun:stun.l.google.com:19302" } + { url: "stun:chat.lookshe.org:5555" } ] } this.rtcOptions = player.options.rtcOptions || { @@ -107,6 +107,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ // Play the local stream self.video[0].src = URL.createObjectURL(localStream); + self.video[0].volume = 1; self.pc.addStream(localStream); //if (params.caller) @@ -138,6 +139,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ if (this.video) { this.video[0].src = ''; + this.video[0].parentNode.removeChild(this.video[0]); // Do not nullify } @@ -173,6 +175,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ }, toggleVideo: function() { + //videoTracks = this.video[0].videoTracks; videoTracks = myLocalStream.getVideoTracks(); if (videoTracks.length === 0) { Symple.log('No local video available.'); @@ -195,6 +198,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ }, toggleAudio: function() { + //audioTracks = this.video[0].audioTracks; audioTracks = myLocalStream.getAudioTracks(); if (audioTracks.length === 0) { @@ -339,6 +343,7 @@ Symple.Player.Engine.WebRTC = Symple.Player.Engine.extend({ self.video[0].src = URL.createObjectURL(event.stream); self.video[0].play(); + self.video[0].volume = 1; }; this.pc.onremovestream = function(event) { Symple.log("SympleWebRTC: Remote stream removed:", event); |