Skip to content

Mute pauses Spotify when playing ad #1

Closed

Description

@Deseteral

When Spotify is playing advertisement, and SpotifyMusicHandler.Mute() function is called, Spotify will be paused until SpotifyMusicHandler.UnMute() is called.

It's more Spotify "issue" rather than this API, but I've added this anyway, so maybe someone will find a workaround ;)

Activity

  1. JohnnyCrazy commented on Feb 19, 2014

    @JohnnyCrazy
    Owner

    Try this workaround, it should work:

    musichandler.Mute()
    Thread.Sleep(1000) //Should be enough
    musichandler.Play()

    I tried that some time ago and I think it worked 😀

  2. self-assigned this
    on Feb 19, 2014
  3. Deseteral commented on Feb 19, 2014

    @Deseteral
    Author

    Thanks, it works 😄

    Maybe it's good idea to do something like that:

    void Mute()
    {
        // Mute code...
    
        if (isAd && isPlaying)
        {
            Thread.Sleep(1000);
            musichandler.Play();
        }
    }

    What do you think?

  4. JohnnyCrazy commented on Feb 19, 2014

    @JohnnyCrazy
    Owner

    Yea, it would make sense, but here is the reason why i won't do this:

    If i implement that function directly in my API, i would provide a way to bypass the advertisment-System from Spotify. So, Spotify could "maybe" contact me and take the software from the internet, because it's against their license etc.
    But if i leave it like now, the user needs to implement the function and is responsible for this action.

    I hope you can understand my point of view

  5. Deseteral commented on Feb 19, 2014

    @Deseteral
    Author

    Right, that makes sense.
    Thanks for your help 👍

  6. JohnnyCrazy commented on Feb 19, 2014

    @JohnnyCrazy
    Owner

    No Problem 😄

    If you have any further problems, just report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions