Skip to content

Commit

Permalink
screen share subscribe bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
HeiSir2014 committed Jan 17, 2021
1 parent 427b798 commit f966f8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function ipcMessageFun(e,channel,data){
if (channel === 'close-win') {
win.close();
}
else if(channel === 'show-screen'){
else if(channel === 'show-screen' || (isDev && channel == 'show-screen-publish')){
screenWindow && (screenWindow.close());
screenWindow = null;
screenWindow = CreateDefaultWin();
Expand Down
2 changes: 1 addition & 1 deletion static/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ const runSocketIOSample = function () {
});

//ipcRenderer.send('show-screen', publication.id);
ipcRenderer.send('show-screen', `${location.search}&streamId=${publication.id}`);
ipcRenderer.send('show-screen-publish', `${location.search}&streamId=${publication.id}`);

}, err => {
ScreenStream && ScreenStream.mediaStream && (destroyMediaStream(ScreenStream.mediaStream)),(ScreenStream = null);
Expand Down
1 change: 1 addition & 0 deletions static/scripts/screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const runSocketIOSample = function() {
function subscribeAndRenderVideo(stream){
let subscirptionLocal=null;
let $video = document.querySelector('.video-container .playRTC');
const videoOptions = {};
videoOptions.codecs = [{ name: "h264", profile: "CB" }];
videoOptions.resolutions = [stream.settings.video[0].resolution];
videoOptions.bitrateMultipliers = [1];
Expand Down

0 comments on commit f966f8f

Please sign in to comment.