Skip to content

Commit

Permalink
[mirotalkbro] - allow video streaming up to 8k
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Aug 4, 2024
1 parent 8517278 commit 9bba140
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license For open source under AGPL-3.0
* @license For private project or commercial purposes contact us at: [email protected]
* @author Miroslav Pejic - [email protected]
* @version 1.0.52
* @version 1.0.53
*/

require('dotenv').config();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkbro",
"version": "1.0.52",
"version": "1.0.53",
"description": "P2P WebRTC audio, video and screen live broadcast",
"main": "app/server.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions public/css/broadcast.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
background: var(--secondary-color);
border: var(--border);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
}

.broadcast-header {
Expand Down
1 change: 1 addition & 0 deletions public/css/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
background: var(--secondary-color);
border: var(--border);
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
}

.viewer-header {
Expand Down
19 changes: 18 additions & 1 deletion public/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,22 @@ function getVideoConstraints() {
frameRate: videoFrameRate,
};
break;
case '6k':
videoConstraints = {
width: { exact: 6144 },
height: { exact: 3456 },
frameRate: videoFrameRate,
};
break;
case '8k':
videoConstraints = {
width: { exact: 7680 },
height: { exact: 4320 },
frameRate: videoFrameRate,
};
break;
default:
break;
}
return videoConstraints;
}
Expand Down Expand Up @@ -944,7 +960,7 @@ function gotDevices(deviceInfos) {
// Handle window exit
// =====================================================

window.onunload = window.onbeforeunload = () => {
window.onbeforeunload = () => {
socket.close();
if (thereIsPeerConnections()) {
for (let id in peerConnections) {
Expand All @@ -955,4 +971,5 @@ window.onunload = window.onbeforeunload = () => {
}
stopSessionTime();
saveRecording();
return undefined;
};
3 changes: 2 additions & 1 deletion public/js/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,12 @@ function sendMessage() {
// Handle window exit
// =====================================================

window.onunload = window.onbeforeunload = () => {
window.onbeforeunload = () => {
socket.close();
if (peerConnection) {
peerConnection.close();
}
stopSessionTime();
saveRecording();
return undefined;
};
2 changes: 2 additions & 0 deletions public/views/broadcast.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
<option value="fhd">FULL HD</option>
<option value="2k">2K</option>
<option value="4k">4K</option>
<option value="6k">6K</option>
<option value="8k">8K</option>
</select>
<select id="videoFpsSelect">
<option value="default">Default</option>
Expand Down

0 comments on commit 9bba140

Please sign in to comment.