Git Product home page Git Product logo

unmute's People

Contributors

swevans avatar yomed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

unmute's Issues

TypeError: context.resume is not a function

Hi,

Thanks again for the great script, works great!

In the console I get TypeError: context.resume is not a function on unmute.js:62:29 on every click / mousedown / touch. On the minified version as TypeError: i.resume is not a function.

Fuzzy audio when playing background audio

First off, thank you @swevans for this script. It's been super helpful for us. I'm running into a unique situation that I was hoping you might have some input on:

We have a native app that uses a wkwebview for an audio player that's driven by Web Audio. Unmute has enabled our users to hear the audio if their ringer is set to silent (again, thanks for that!). The interesting thing that's happening is when the app is put in the background -- We've set it to "allow" airplay and background playing (via tag.disableRemotePlayback), but the result is a broken sounding audio file (check out the video below). It's such a unique combination of tech that I haven't been able to find anything on SO and since without Unmute the background audio doesn't work at all, I figured I'd see if you had any insight to offer.

Thanks!

Video: http://dancress.com/img/cb_broken_audio.mp4

audio context is sometimes not resumed correctly

Hello @swevans, and thank you for this script (and for your SO answers) which eventually got me unstuck on my project!

However, I'm finding that occasionally the audio is not resumed correctly when working on Chrome on my laptop. After some investigation I think the problem is here:

    function pageStateCheck() {
        if (isPageVisible && iosIsPageFocused) {
            if (!isPageActive) {
                isPageActive = true;
                pageActivated();
            }
        }
        else {
            if (isPageActive) {
                isPageActive = false;
                pageDeactivated();
            }
        }
    }

i.e. the first if condition will only be true if iosIsPageFocused is true - which looks questionable to me as that variable is clearly only relevant for ios. Of course it would be ok if that var just stayed true if we're not ios, but after much logging I find that it can become false (e.g. if the page is refreshed though its tab is not in the foreground).

So I think the fix would be something like the following:

    function pageStateCheck() {
        if (isPageVisible && (iosIsPageFocused || !isIOS)) {
            if (!isPageActive) {
...

I'd really appreciate it if you were able to confirm this, or otherwise point me in the right direction.

Many thanks!

Doesn't work on newest iPad 5th Gen with 15.2 Beta

EDITED:
I was using the older script that doesn't mute on tab change...
maybe you should include this as an option I want my sound to never be muted at all.

OLD COMMENT:
Hi there, I was successfully using your unmute script it's really awesome, tough, it is not working on newest iPad 5th Gen with 15.2 Beta.

So what I did is I removed the condition to detect if it's iOS and it works like a charm. You might consider improving the iPad iOS detection here to make the script more compatible.

BIG THANKS (you can keep the pizza donation ... only if you buy a veg pizza!)

if (isIOS) { }

Huge Thanks, capacitor v3 + stenciljs work in silent mode

Man, you made my capacitor v3 / stenciljs music generation app able to work in silent mode.
On top of that when I use your other unmute-no-pause version I can add background mode.
I'll work on making WebAudio interact with native audio iOS control center and report here.
You saved many headaches and hours of useless work.
I'll buy you a pizza.

Destroying channel tag leads to /null request

Hi again. I've been using this recently on a project, and noticed that there was uptick in requests to /null on my server. From digging in the code, it looks like this is caused by destroyChannelTag(). I can repro by creating an audio tag and setting it's src to null like in the code.

unmute/dev/src/unmute.ts

Lines 240 to 249 in 3c6b03e

function destroyChannelTag():void
{
if (channelTag)
{
// Change src to nothing and trigger a load, this is required to actually hide / clear the iOS playback controls
channelTag.src = null;
channelTag.load();
channelTag = null;
}
}

It seems mostly harmless, but wanted to check if you've seen this, and if you had other ideas on workarounds to hide the playback controls.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.