Skip to content
This repository has been archived by the owner on Oct 20, 2019. It is now read-only.

Commit

Permalink
implement #16 pause/resume video
Browse files Browse the repository at this point in the history
  • Loading branch information
fycth committed Dec 7, 2015
1 parent 28d9a85 commit 8f30074
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/WebRTCO.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,12 @@ var WebRTCO = function(options) {
for (i = 0; i < audioTracks.length; i++) audioTracks[i].enabled = mute;
};

// pause/resume local video
API.pauseVideo = function(pause) {
var videoTracks = localStream.getVideoTracks();
for (i = 0; i < videoTracks.length; i++) videoTracks[i].enabled = pause;
};

function getScreenCastingConstraints() {
if (API.Adapter.name === 'Firefox') return screen_casting_constraints.firefox;
else if (API.Adapter.name === 'Chrome') return screen_casting_constraints.chrome;
Expand Down

0 comments on commit 8f30074

Please sign in to comment.