Closed Bug 1333609 Opened 8 years ago Closed 8 years ago

Neither media.block-play-until-visible or media.block-autoplay-until-in-foreground config keys are blocking videos from automatically playing in Firefox 51.0, 32-bit version

Categories

(Core :: Audio/Video: Playback, defect)

51 Branch
Unspecified
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: u587639, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20170118123726 Steps to reproduce: I opened multiple youtube videos in new tabs (pressing ctrl + left clicking on link). Actual results: All the videos started playing even though their tabs were not selected/active. Expected results: The videos should not have played until their tabs had been selected/active. I've had "media.block-play-until-visible" set to true for a long time in about:config and after a little research, I read that this string was being shifted to "media.block-autoplay-until-in-foreground" in Firefox 51 but neither strings being set to true is preventing the youtube videos from autoplaying. In fact on one instance the audio kept playing for the video even after I had paused the video causing me to restart Firefox.
OS: Unspecified → Windows 8.1
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Simona, Can you help check if you can repro this problem or not?
Flags: needinfo?(simona.marcu)
Weird I'm not getting this problem anymore. I played around with values in about:config and now I have both media.block-play-until-visible and media.block-autoplay-until-in-foreground set to true (this seems to have done the trick). But a problem I still notice is if you open multiple YouTube video tabs (ctrl + link or right-click link and hit "open in new tab") and reload all tabs (I have Tab Mix Plus add-on meaning I just right-click on a tab and hit "Reload All Tabs"), once you to go the video and press pause the audio continues to play...Now sure this could be the add-on at fault but I just want to note that this didn't happen in the previous version on Firefox. Another problem I see is once a video starts playing in a tab (meaning once a tab has been set to "active") and you reload the tab and quickly switch tabs (before the video player even loads) or just go to another tab and reload the tab that had been set to "active" using an add-on (such as Tab Mix Plus), the video will start playing and not stop until finished or unless paused. Meaning the media.block-autoplay-until-in-foreground works until a tab has been to active after that even if you switch to another tab and reload, it will not work. Seems like a bug. I truly hope you understand what I'm trying to say. It might take a few reads to understand what I mean. Sorry that I couldn't word it better.
(In reply to Blake Wu [:bwu][:blakewu] (OoO from 1/27 - 2/1) from comment #1) > Simona, > Can you help check if you can repro this problem or not? I can see why this might be confusing. If "media.block-play-until-visible" was changed from the default state by being set to true on Firefox 50.0.2 and then Firefox is updated to Firefox 51, after the update both preferences (the old one - "media.block-play-until-visible" and the new one - "media.block-autoplay-until-in-foreground") are kept in about:config as: "media.block-play-until-visible" = true "media.block-autoplay-until-in-foreground" = false The videos are not blocked since "media.block-autoplay-until-in-foreground" is set by default to false (expected behavior). If the preference "media.block-play-until-visible" is not changed from the default state (remains as false), after updating to Firefox 51 it becomes unavailable in about:config. In this case, only "media.block-autoplay-until-in-foreground" is present in about:config. I'm not sure how the clean up of the old preference should have been done after the update and if the new preference ("media.block-autoplay-until-in-foreground") should have been borrowed the value of the old one ("media.block-play-until-visible").
Flags: needinfo?(simona.marcu)
(In reply to Simona B [:simonab ] from comment #3) > If the preference "media.block-play-until-visible" is not changed from the > default state (remains as false), after updating to Firefox 51 it becomes > unavailable in about:config. In this case, only > "media.block-autoplay-until-in-foreground" is present in about:config. I saw a new version of Firefox available (51.0.1) and set both preferences to default before updating Firefox. The "media.block-play-until-visible" preference was gone when Firefox restarted. I then set "media.block-autoplay-until-in-foreground" to true again. But the issues that I mentioned in the previous comment still exist: > But a problem I still notice is if you open multiple YouTube video tabs > (ctrl + link or right-click link and hit "open in new tab") and reload all > tabs (I have Tab Mix Plus add-on meaning I just right-click on a tab and hit > "Reload All Tabs"), once you to go the video and press pause the audio > continues to play...Now sure this could be the add-on at fault but I just > want to note that this didn't happen in the previous version on Firefox. > Another problem I see is once a video starts playing in a tab (meaning once > a tab has been set to "active") and you reload the tab and quickly switch > tabs (before the video player even loads) or just go to another tab and > reload the tab that had been set to "active" using an add-on (such as Tab > Mix Plus), the video will start playing and not stop until finished or > unless paused. Meaning the media.block-autoplay-until-in-foreground works > until a tab has been to active after that even if you switch to another tab > and reload, it will not work. Seems like a bug. But I did want to note that the audio that starts playing even when video is paused only lasts for a couple of seconds, so it's kind of like a lag of sorts. I don't understand what you mean by: > The videos are not blocked since "media.block-autoplay-until-in-foreground" > is set by default to false (expected behavior). I tried setting the preference to false and the videos don't get blocked...
(In reply to u587807 from comment #4) > I saw a new version of Firefox available (51.0.1) and set both preferences > to default before updating Firefox. The "media.block-play-until-visible" > preference was gone when Firefox restarted. I then set > "media.block-autoplay-until-in-foreground" to true again. But the issues > that I mentioned in the previous comment still exist: > > But a problem I still notice is if you open multiple YouTube video tabs > > (ctrl + link or right-click link and hit "open in new tab") and reload all > > tabs (I have Tab Mix Plus add-on meaning I just right-click on a tab and hit > > "Reload All Tabs"), once you to go the video and press pause the audio > > continues to play...Now sure this could be the add-on at fault but I just > > want to note that this didn't happen in the previous version on Firefox. I can't reproduce this issue, tried with and without having the Tab Mix Plus add-on installed. Could you please try to reproduce the issue using Firefox in Safe mode? (this way we can eliminate the actions of add-ons and even resets some settings). If the issue is still reproducible in Safe mode, could you please write here the exact steps you are doing?(a screen cast will be even better). You can find here more details about how to start Firefox in safe mode: https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode > > Another problem I see is once a video starts playing in a tab (meaning once > > a tab has been set to "active") and you reload the tab and quickly switch > > tabs (before the video player even loads) or just go to another tab and > > reload the tab that had been set to "active" using an add-on (such as Tab > > Mix Plus), the video will start playing and not stop until finished or > > unless paused. Meaning the media.block-autoplay-until-in-foreground works > > until a tab has been to active after that even if you switch to another tab > > and reload, it will not work. Seems like a bug. Not a bug. Is the way the preference media.block-autoplay-until-in-foreground preference is working. Once a tab is in foreground, media on that tab will not be blocked anymore. > But I did want to note that the audio that starts playing even when video is > paused only lasts for a couple of seconds, so it's kind of like a lag of > sorts. > I don't understand what you mean by: > > The videos are not blocked since "media.block-autoplay-until-in-foreground" > > is set by default to false (expected behavior). > I tried setting the preference to false and the videos don't get blocked... The videos are only blocked (if opened in a background tabs) if the preference is set to true.
(In reply to Simona B [:simonab ] from comment #5) > Could you please try to reproduce the issue using Firefox > in Safe mode? (this way we can eliminate the actions of add-ons and even > resets some settings). If the issue is still reproducible in Safe mode, > could you please write here the exact steps you are doing?(a screen cast > will be even better). Sorry for the late response. I tried starting Firefox in Safe Mode and the problem still exists. I have made 2 screencasts and uploaded them to YouTube. The first is with me reloading the tabs using Tab Mix Plus add-on ( https://www.youtube.com/watch?v=eb9QCAc4OXA ) and the second is with Firefox in Safe Mode ( https://www.youtube.com/watch?v=y3zzYENQL18 ), the videos are titled appropriately. To not make this comment too long, I've added relevant video information in the descriptions for both videos. > Not a bug. Is the way the preference > media.block-autoplay-until-in-foreground preference is working. Once a tab > is in foreground, media on that tab will not be blocked anymore. But wouldn't opening a second tab (foreground), make the first tab a "background" tab?
Thank you for all the additional details, I think I understand now what you mean. The functionality of the old preference (media.block-play-until-visible) was different by the functionality of the the new one (media.block-autoplay-until-in-foreground). With this new functionality, videos which autoplay in the background will now have their load deferred until the tab is visible for the first time. This is the reason why after opening a video and reloading it, the video still plays. Please let us know if you still have any questions related with this.
(In reply to Simona B [:simonab ] from comment #7) Do you know of any work arounds for this? I prefer the old preference! xD
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
(In reply to u588159 from comment #8) > (In reply to Simona B [:simonab ] from comment #7) > > Do you know of any work arounds for this? I prefer the old preference! xD Sorry. We will not have any workarounds for it and media.block-autoplay-until-in-foreground is the one we continue to use.
You need to log in before you can comment on or make changes to this bug.