Giter Site home page Giter Site logo

Comments (22)

NDevTK avatar NDevTK commented on May 24, 2024

Thanks for the report, I will look into this now.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Unable to verify :(

Permission: https://.pandora.com/ https://.youtube.com/
Firefox Version: 93.0

Test URL: https://www.pandora.com/station/play/97785068763745031

Paused on going to
https://www.youtube.com/watch?v=DLzxrzFCyOs

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

That's strange. Perhaps it is a macOS-specific issue. I'll poke around and see if I can replicate it elsewhere.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

I did some further digging and discovered that the issue only pops up when I'm logged into Pandora. When I'm not logged into Pandora and try to play music, the extension works.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

When monitoring the console, I'm seeing this error when attempting to use the extension with Pandora logged in:

Uncaught (in promise) Error: Did not auto-fill
doAutoFill moz-extension://fb243680-a7c8-5a4d-b08e-b51e173aa6d7/background.js:25020
fulfilled moz-extension://fb243680-a7c8-5a4d-b08e-b51e173aa6d7/background.js:24820

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Thats for a different extension to many lines.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Please confirm it does not work even with no other extensions.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

I can confirm that it does not work even with no other extensions.

Here is what I tried:

With an existing profile:

  1. Existing profile + all other extensions enabled + Pandora logged in = does not work
  2. Existing profile + all other extensions disabled + Pandora logged in = does not work
  3. Existing profile + all other extensions disabled + Pandora logged out = works

With a brand new profile:

  1. New profile + all other extensions enabled + Pandora logged in = does not work
  2. New profile + all other extensions disabled + Pandora logged in = does not work
  3. New profile + all other extensions disabled + Pandora logged out = works

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

I dont have a Pandora account.

From the browser console for that page does doing document.getElementsByTagName("audio")[0].playbackRate = 0;
0 being the index of the audio element result in it pausing?
Otherwise if the element does exist try doing document.getElementsByTagName("audio")[0].pause()

Due to autoplay restrictions it uses the playbackRate, If the permissions are correct I suspect Pandora is changing the playbackRate back.

I changed this in 2.7

// Dont allow a diffrent tab to hijack active media.
just never released it.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

You can try it from https://github.com/NDevTK/AutoPause/actions/runs/1257459540 about:debugging#/runtime/this-firefox
If thats better I will probably move the check to be before the media starts playing.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

Answering your first comment:

Running document.getElementsByTagName("audio")[0].playbackRate = 0; returns

← 0

Running document.getElementsByTagName("audio")[0].pause() returns

ERROR: client/sxm-audio-player: :[AP]: HTML5AudioPlayer  Failed to unBlock AudioContext of sampleAudioElement
← undefined

Answering your second comment:

I installed that in Nightly and tried it with Pandora and YouTube. Oddly, YouTube paused when starting the Pandora audio, but the Pandora audio would not pause when starting the YouTube audio. It's not having any effect on Pandora's audio at all.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

To confirm both .playbackRate = 0; and .pause(); dont pause it.
And when you do document.getElementsByTagName("audio") its the only audio element on the page?

It maybe that its live and does not support pausing 2.7 also has a tab mute feature in the options page that may also work,
And waste bandwidth.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

Neither of them paused the audio.

Running document.getElementsByTagName("audio") by itself returns

← HTMLCollection { 0: audio , length: 1 }

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

The audio can be paused with other methods, though.

I use the Pandora Media Session extension to enable the use of my keyboard's media keys (because Pandora does not do this natively on Firefox). It simulates click actions to play/pause audio and skip tracks. I don't know how effective that would be in this use case, though.

(I made sure this extension was not enabled when testing the functions above.)

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

It seems to work by simulating a click on the page that being site specific.
Does it resume to the same time or is it just live?

If it is just live then the auto tab mute feature should be fine otherwise new code would need to be add to support this.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

It resumes to the same time.

I'm perfectly content with the auto tab mute feature, though. I don't think we need to make your extension more complicated just to support one site that not everyone uses. The extension works fine for pretty much any other website I've tried it on.

Thank you for your help.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

It should be supported its strange because if the .playbackRate is 0 and stays 0 the audio should never play.
If .currentTime is changing with a playbackRate of 0 and since this after a browser update it may be a bug in firefox.
By the error it seems that the normal .pause() has been overridden by the website.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Im aware the current tab mute feature is broken i will try to fix it.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Per #14 (comment) as the tab mute feature is on the webstore version and I dont have access to Pandora... I will close this issue now please reopen if its still wanted.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

Currently theirs a feature to mark a tab as background audio for resuming I think I might add a mute only option so that live media works correctly.

from autopause.

giantspeck avatar giantspeck commented on May 24, 2024

Sorry for the late response, but I've actually been able to use AutoPause with Pandora for a few weeks ago. I'm not sure if it was a Firefox update or the latest version of AutoPause that fixed the issue, but the issue isn't there anymore.

from autopause.

NDevTK avatar NDevTK commented on May 24, 2024

No idea what fixed it but glad its working now :)
Closing as unreproducible.

from autopause.

Related Issues (16)

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.