Comments (22)
Thanks for the report, I will look into this now.
from autopause.
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.
That's strange. Perhaps it is a macOS-specific issue. I'll poke around and see if I can replicate it elsewhere.
from autopause.
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.
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.
Thats for a different extension to many lines.
from autopause.
Please confirm it does not work even with no other extensions.
from autopause.
I can confirm that it does not work even with no other extensions.
Here is what I tried:
With an existing profile:
- Existing profile + all other extensions enabled + Pandora logged in = does not work
- Existing profile + all other extensions disabled + Pandora logged in = does not work
- Existing profile + all other extensions disabled + Pandora logged out = works
With a brand new profile:
- New profile + all other extensions enabled + Pandora logged in = does not work
- New profile + all other extensions disabled + Pandora logged in = does not work
- New profile + all other extensions disabled + Pandora logged out = works
from autopause.
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
Line 72 in 9a6c7ae
from autopause.
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.
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.
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.
Neither of them paused the audio.
Running document.getElementsByTagName("audio")
by itself returns
← HTMLCollection { 0: audio , length: 1 }
from autopause.
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.
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.
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.
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.
Im aware the current tab mute feature is broken i will try to fix it.
from autopause.
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.
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.
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.
No idea what fixed it but glad its working now :)
Closing as unreproducible.
from autopause.
Related Issues (16)
- How will it work in case of inherited HTML tags (custom elements) and Shadow DOM (including closed DOM)? HOT 6
- Pausing picture in picture does not use automatic resume HOT 2
- checkVisibility cant check for PiP on firefox. HOT 1
- Go to Active Tab Hotkey HOT 7
- Prevent websites with notification sounds (or any website) from pausing other websites playing media? HOT 9
- Clarify multi-window usage HOT 6
- Can't change settings when extensions.webextensions.remote = false HOT 11
- [Feature Request] Options to disable auto-resume feature HOT 3
- Can't customize keyboard shortcuts HOT 3
- Netflix Video Not Working: Blackscreen HOT 12
- PiP detection is not universal. HOT 1
- doesn't work on many sites .. HOT 7
- Potentially not wanted third tab behavior HOT 40
- Fix silent media detection HOT 1
- Fix issue with multiple windows HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autopause.