[mirotalksfu] - add test speaker btn

هذا الالتزام موجود في:
Miroslav Pejic
2023-08-26 17:34:08 +02:00
الأصل 0d7413731f
التزام 6d00184ab2
4 ملفات معدلة مع 12 إضافات و4 حذوفات

عرض الملف

@@ -982,6 +982,9 @@ function handleButtons() {
tabLanguagesBtn.onclick = (e) => {
rc.openTab(e, 'tabLanguages');
};
speakerTestBtn.onclick = () => {
sound('ring', true);
};
chatButton.onclick = () => {
rc.toggleChat();
};
@@ -1782,8 +1785,8 @@ function setVideoButtonsDisabled(disabled) {
stopVideoButton.disabled = disabled;
}
async function sound(name) {
if (!isSoundEnabled) return;
async function sound(name, force = false) {
if (!isSoundEnabled && !force) return;
let sound = '../sounds/' + name + '.wav';
let audio = new Audio(sound);
try {

عرض الملف

@@ -2281,8 +2281,8 @@ class RoomClient {
// UTILITY
// ####################################################
async sound(name) {
if (!isSoundEnabled) return;
async sound(name, force = false) {
if (!isSoundEnabled && !force) return;
let sound = '../sounds/' + name + '.wav';
let audio = new Audio(sound);
try {

ثنائية
public/sounds/ring.wav Normal file

ملف ثنائي غير معروض.

عرض الملف

@@ -327,6 +327,11 @@ access to use this app.
<p>Speaker:</p>
</div>
<select id="speakerSelect" class="form-select text-light bg-dark"></select>
<hr style="border: 1px solid grey" />
<button id="speakerTestBtn">
<i class="fa-solid fa-circle-play"></i>
<p>Test speaker</p>
</button>
<br />
</div>
<br />