Skip to content

Commit

Permalink
Merge pull request #468 from Jenfong/firefox_video_record_support
Browse files Browse the repository at this point in the history
Firefox video record support
  • Loading branch information
deleolajide authored Dec 21, 2023
2 parents 1f7e410 + 7122d14 commit 44bd9c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/java/org/ifsoft/websockets/LiveStreamSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public boolean isOpen() {

final String ffmpeg = path + File.separator + ffmpegName;
final String url = liveStreamUrl + "/" + metadata.getString("key");
final String cmdLine = ffmpeg + " -i - -vcodec copy -f flv " + url;
final String cmdLine = ffmpeg + " -i - -vcodec libx264 -f flv " + url;
ffmpegThread = Spawn.startProcess(cmdLine, new File(path), this);

securityAuditManager.logEvent("pade", "meeting - " + metadata.getString("room") + " live stream by " + metadata.getString("user"), url);
Expand Down
6 changes: 4 additions & 2 deletions src/webapp/custom_ofmeet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2608,6 +2608,7 @@ var ofmeet = (function (ofm) {
console.debug('ofmeet.js startDesktopRecorder - live streaming', tracks, ws_url);

let websocket = connectLiveStream("wss://" + ws_url[2] + "/livestream-ws/", config.ofmeetStreamKey);

//fix firefox's unsupported codec error
let mimeType = ''
//Safari not support isTypeSupported
Expand All @@ -2625,8 +2626,9 @@ var ofmeet = (function (ofm) {
}
}
}
}
videoRecorder[id] = new MediaRecorder(recorderStreams[id], { mimeType: 'video/webm;codecs=h264', bitsPerSecond: 256 * 8 * 1024 });
}

videoRecorder[id] = new MediaRecorder(recorderStreams[id], { mimeType: mimeType, bitsPerSecond: 256 * 8 * 1024 });

videoRecorder[id].ondataavailable = function (e) {
websocket.send(e.data);
Expand Down

0 comments on commit 44bd9c1

Please sign in to comment.