Skip to content

Mute functionality is not working on video element by calling volume API by 0/1 #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

suresh-khurdiya-infosys
Copy link

@suresh-khurdiya-infosys suresh-khurdiya-infosys commented Mar 19, 2025

Audio is not muted when application call a volume API by setting a zero.
Request came for Apple TV application.
Scenario:
Launch the apple TV URL.
Playback any content
set the volume command from web inspector console like below
document.querySelector("video").volume = 0 --> Audio should mute
or
document.querySelector("video").volume = 1--> Audio should unmute it.

e4c585b

Build-Tests Layout-Tests
✅ 🛠 wpe-238-amd64-build ❌ 🧪 wpe-238-amd64-layout
✅ 🛠 wpe-238-arm32-build ✅ 🧪 wpe-238-arm32-layout

@philn
Copy link

philn commented Mar 19, 2025

The CI has detected various regressions due to this patch. I don't think this is upstream-able.

@philn philn added the wpe-2.38 label Mar 19, 2025
@suresh-khurdiya-infosys
Copy link
Author

suresh-khurdiya-infosys commented Mar 20, 2025

The CI has detected various regressions due to this patch. I don't think this is upstream-able.

What kind of failure are we seeing? because changes are limited to volume API.
So, Just want to know that why it is creating a more regression and is it possible to fix them with some common fix?

yes, now I can see 5 layout test failure and I am trying to check on my device those device but not seeing any result even for passed test case like audio-play.html.
Do, we need to run any other command to start play?

@suresh-khurdiya-infosys
Copy link
Author

@philn If possible then please share the steps so that I can run locally on my device those failure test case for fixing.

@philn
Copy link

philn commented Mar 20, 2025

See the first line of https://ews-wpe-rdk.igalia.com/#/builders/6/builds/47/steps/18/logs/stdio:

python3 Tools/Scripts/run-webkit-tests --no-build --no-show-results --no-new-test-results --clobber-old-results --release --wpe --results-directory layout-test-results --debug-rwt-logging --exit-after-n-failures 5000 --skip-failing-tests --enable-core-dumps-nolimit

gst_stream_volume_set_volume(m_volumeElement.get(), GST_STREAM_VOLUME_FORMAT_LINEAR, static_cast<double>(volume));

bool audioMuted = (volume == 0) ? true : false;
g_object_set(m_volumeElement.get(), "mute", static_cast<gboolean>(audioMuted), nullptr);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this... can you try to make MediaPlayerPrivateGStreamer::isMuted()) return true when the volume is 0?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this... can you try to make MediaPlayerPrivateGStreamer::isMuted()) return true when the volume is 0?

You mean that update m_isMuted variable based upon the volume==0 or 1.
See below code change

  • m_isMuted = (volume == 0) ? true : false;
  • g_object_set(m_volumeElement.get(), "mute", static_cast(m_isMuted), nullptr);

@suresh-khurdiya-infosys suresh-khurdiya-infosys force-pushed the suresh/ARRISEOS-47239_upstream branch from 2dce7b7 to e4c585b Compare March 21, 2025 04:53
@suresh-khurdiya-infosys
Copy link
Author

See the first line of https://ews-wpe-rdk.igalia.com/#/builders/6/builds/47/steps/18/logs/stdio:

python3 Tools/Scripts/run-webkit-tests --no-build --no-show-results --no-new-test-results --clobber-old-results --release --wpe --results-directory layout-test-results --debug-rwt-logging --exit-after-n-failures 5000 --skip-failing-tests --enable-core-dumps-nolimit

Thanks , by running at the code path, I am getting below error (WebKitTestRunner was not found). Please suggest that how can I fix it.
0:38:22.267 533289 Found 78561 tests; running 52302, skipping 26259.
10:38:22.267 533289 Checking build ...
10:38:22.267 533289 WebKitTestRunner was not found at /home/sureshkhurdiya/sureshkhurdiya/ProjectWork/Codes/Mar11/onemw/build-brcm972127ott-refboard/tmp/work/armv7vet2hf-neon-vfpv4-rdkmllib32-linux-gnueabi/lib32-wpe-webkit/1_2.38+git-r0/git/WebKitBuild/Debug/bin/WebKitTestRunner
10:38:22.267 533289 Build check failed
10:38:22.275 533289 Testing completed, Exit status: -1

@suresh-khurdiya-infosys
Copy link
Author

@philn Could you please check and suggest that how can we fix the failure test?

@philn
Copy link

philn commented Mar 27, 2025

idk how to do that with yocto. Please do this on the host (no cross-compilation).

@suresh-khurdiya-infosys
Copy link
Author

idk how to do that with yocto. Please do this on the host (no cross-compilation).

I am trying on mu ubuntu machine but getting some error related to QT5 cmake error. So, still check it but is it possible for you to update the patch based upon the your local change then it would be good to close fastly.
BTW, Do you have account on SKyPE or anything where we can do 1 to 1 communcaion.

@philn
Copy link

philn commented Mar 28, 2025

document.querySelector("video").volume = 0 --> Audio should mute
or
document.querySelector("video").volume = 1--> Audio should unmute it.

What do you mean by "Audio should mute"?

  • the muted attribute should become true?
  • actual audio should be silent?

Because setting volume to 0 should already make the audio silent on the audio sink. If that is not the case, then this is a bug in your audio sink.

@philn
Copy link

philn commented Mar 28, 2025

I see no indication in the spec that setting volume to 0 should also set the muted attribute to true.

@suresh-khurdiya-infosys
Copy link
Author

document.querySelector("video").volume = 0

Ok Let me check to handle at audio sink level.

@suresh-khurdiya-infosys
Copy link
Author

Thanks @philn We have handled at audio sink level and currently it is working fine with this change. Hence we can ignore this PR and close this ticket.

@philn
Copy link

philn commented Apr 11, 2025

OK :)

@philn philn closed this Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants