Skip to content

Commit

Permalink
Fixed stream not starting on first run
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTheSquid committed Jun 18, 2023
1 parent 4b436d8 commit fdb1387
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bd/release/Tuxphones.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ module.exports = !global.ZeresPluginLibrary ? Dummy : (([Plugin, Api]) => {
}
WebSocketControl.streamSetPaused(this.streamKey, false);
Logger.log(this.streamKey);
this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, this.selectedResolution, this.selectedFPS, this.ip, this.port, this.secret_key, this.voice_ssrc, this.base_ssrc);
}
return original(arg);
});
Expand Down Expand Up @@ -236,6 +235,7 @@ module.exports = !global.ZeresPluginLibrary ? Dummy : (([Plugin, Api]) => {
Logger.log("Secret key:");
Logger.log(json.d.secret_key);
this.secret_key = json.d.secret_key;
this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, this.selectedResolution, this.selectedFPS, this.ip, this.port, this.secret_key, this.voice_ssrc, this.base_ssrc);
return;
} else if (json.op == 2) {
this.base_ssrc = json.d.ssrc;
Expand Down
3 changes: 2 additions & 1 deletion bd/src/Tuxphones/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ return class extends Plugin {
}
WebSocketControl.streamSetPaused(this.streamKey, false);
Logger.log(this.streamKey)
this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, this.selectedResolution, this.selectedFPS, this.ip, this.port, this.secret_key, this.voice_ssrc, this.base_ssrc);
// this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, this.selectedResolution, this.selectedFPS, this.ip, this.port, this.secret_key, this.voice_ssrc, this.base_ssrc);

// this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, res, this.selectedFPS, this.serverId, arg.token, arg.endpoint);
// return new Promise(res => res());
Expand Down Expand Up @@ -271,6 +271,7 @@ return class extends Plugin {
Logger.log('Secret key:');
Logger.log(json.d.secret_key);
this.secret_key = json.d.secret_key;
this.startStream(this.currentSoundProfile.pid, this.currentSoundProfile.xid, this.selectedResolution, this.selectedFPS, this.ip, this.port, this.secret_key, this.voice_ssrc, this.base_ssrc);
return; // Disallow encryption information, stopping the stream from being created
} else if (json.op == 2) {
this.base_ssrc = json.d.ssrc;
Expand Down

0 comments on commit fdb1387

Please sign in to comment.