[mirotalksfu] - make video/audio IDs configurable via parameters

هذا الالتزام موجود في:
Miroslav Pejic
2024-07-02 12:41:29 +02:00
الأصل 0f3676a5e5
التزام 8ed2e9a910
5 ملفات معدلة مع 18 إضافات و7 حذوفات

عرض الملف

@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.78
* @version 1.4.79
*
*/
@@ -1728,7 +1728,7 @@ function handleButtons() {
rc.stopRTMP();
};
streamerRtmpButton.onclick = () => {
openURL('/rtmp', true);
openURL(`/rtmp?v=${videoSelect.value}&a=${microphoneSelect.value}`, true);
};
startRtmpURLButton.onclick = () => {
rc.startRTMPfromURL(rtmpStreamURL.value);
@@ -4071,7 +4071,7 @@ function showAbout() {
imageUrl: image.about,
customClass: { image: 'img-about' },
position: 'center',
title: 'WebRTC SFU v1.4.78',
title: 'WebRTC SFU v1.4.79',
html: `
<br />
<div id="about">

عرض الملف

@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.78
* @version 1.4.79
*
*/

عرض الملف

@@ -11,6 +11,15 @@ const popup = document.getElementById('popup');
const popupMessage = document.getElementById('popupMessage');
const closePopup = document.getElementById('closePopup');
const qs = new URLSearchParams(window.location.search);
const videoId = qs.get('v');
const audioId = qs.get('a');
console.log('Video/Audio id', {
video: videoId,
audio: audioId,
});
/*
Low Latency: 1-2 seconds
Standard Use Case: 5 seconds
@@ -243,7 +252,9 @@ function stopTracks(stream) {
}
async function startCameraStreaming() {
const stream = await startCapture({ video: true, audio: true });
const videoConstraints = videoId ? { deviceId: videoId } : true;
const audioConstraints = audioId ? { deviceId: audioId } : true;
const stream = await startCapture({ video: videoConstraints, audio: audioConstraints });
await startStreaming(stream);
}