Closed Bug 988253 Opened 10 years ago Closed 10 years ago

Add UI for autoplay preference

Categories

(Firefox for Android Graveyard :: Settings and Preferences, defect, P2)

Other
Android
defect

Tracking

(firefox36 verified, fennec+)

VERIFIED FIXED
Firefox 36
Tracking Status
firefox36 --- verified
fennec + ---

People

(Reporter: krudnitski, Assigned: liuche)

References

()

Details

(Keywords: uiwanted)

Attachments

(2 files, 1 obsolete file)

I loaded a page - http://www.telegraph.co.uk/news/worldnews/asia/malaysia/10722842/Malaysian-Airlines-missing-plane-gave-off-unexplained-final-ping.html - and started reading the article when this huge noise emanated from my phone at high volume into my almost-sleeping baby's ear.

Seems like video later (and not visible until scrolling) in the article started playing automatically. 

First, I have 'tap to play' enabled for plug-ins so don't expect or want anything to play automatically. Second, why is the volume full blast when my phone is in silent mode?
Dupe of bug 493860?

On viewing the page source, I see they are making use of the Ooyala HTML5 video player with a specified 'autoplay' and 'preload' parameter on the target <video> element. We honour the autoplay and preload parameter: bug 493860.

In the iframeplayer http://s.telegraph.co.uk/tmgads/tools/ooyala/iframeplayer.html they are probably setting an autoplay parameter on the video.

http://support.ooyala.com/developers/documentation/reference/player_v3_dev_createplayers.html

Spoofing the UA in Chrome/ desktop Firefox to our mobile UA (disabling plugins) and loading the bug URL, the video will auto-play as well, try it out here: http://goo.gl/YO5t2X

> First, I have 'tap to play' enabled for plug-ins so don't expect or want anything to play automatically.

As far as I can tell, the Ooyala iframe player prefers the platform Flash over HTML, see: http://s.telegraph.co.uk/tmgads/tools/ooyala/iframeplayer.html, see the script call where they target platform=html5-fallback, which is defined [1] 'Uses Flash but enables fallback to HTML5'. I could only reproduce this without Flash installed as <video> was used.

[1] http://support.ooyala.com/developers/documentation/reference/player_v3_dev_defaultvideo.html
In http://player.ooyala.com/v3/7dfd98005dba40baacc82277f292e522?platform=html5-fallback&version=f8e418e93cff39637390070b7a659110185bec4d

I see the call e.allowAutoPlay=function(){return!e.isIos&&!e.isAndroid}() I bet that's related to their detection. Over to WebCompat for investigation on their detection so we can match the Chrome behaviour when using the Chrome user-agent.
Summary: Video automatically plays on page when it shouldn't → Ooyala Player play's video automatically on page when it shouldn't
Aaron, are they sending us the same code as they're sending chrome?
Flags: needinfo?(aaron.train)
I believe so.
Flags: needinfo?(aaron.train)
In that case, chrome isn't following the spec and we're doing the "right" thing.
Keep in mind that there are legitimate uses for auto play. I suspect people get annoyed by audio auto-playing, but that's a different problem.
Auto play is one thing. But not when my phone volume is set to mute. And intuitively not when I have 'tap to play' enabled...
Although I could accept an argument for auto play but not for the volume over ride. You put the baby back to sleep when that happens next time!
(In reply to Karen Rudnitski [:kar] from comment #7)
> Auto play is one thing. But not when my phone volume is set to mute. And
> intuitively not when I have 'tap to play' enabled...

You mean tap to play for plugins? I thought this was a video tag.
Here is me as a typical user. To watch a video on the BBC, I tap to play. I then go to the telegraph and instead, it auto plays videos. So technically a difference in how they publish videos to their sites, but me as a typical user I am none the wiser.
The preference is "plugin tap to play" because plugins are terrible and we can't fix that.
Week, I am hating video auto play currently. My hated would be mitigated a bit by the volume abiding by my phone volume. So if my phone is on mute, so would the video playback, for instance. Having a video play while I am in a waiting room is equally disruptive, especially if it doesn't abide by my 'low volume' choice. I hate being embarrassed by being 'one of those' to the point I am surfing reluctantly or not attempting to watch videos.
When you say "phone volume" do you mean ringer volume? Android maintains separate volume levels for the phone ringer, the alarm and everything else. You can set all 3 by going to settings->sounds->Volumes. Does that fix your issue?
If you load the aforementioned bug URL in Firefox mobile or desktop (with a mobile UA) without plugins enabled you will see the HTML5 auto-play in a video element. 

I'm not sure why Flash is mentioned in this bug? In mobile and desktop (both UA's for verification) with plugins I get the tap to activate step.
(In reply to Aaron Train [:aaronmt] from comment #14)
> I'm not sure why Flash is mentioned in this bug? In mobile and desktop (both
> UA's for verification) with plugins I get the tap to activate step.

I believe Karen is arguing that having plugins set to "Tap to play" should imply that we should turn off autoplay for <video> and <audio> elements to meet user expectations.
This is a pure "should we ignore autoplay or not" issue.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
tracking-fennec: ? → ---
Hmm, bug 493860 is not really about ignoring autoplay, so I am letting this stand

Edwin - Has anyone from Firefox OS mentioned wanted to disable autoplay on videos?
Status: RESOLVED → REOPENED
Flags: needinfo?(edwin)
Resolution: DUPLICATE → ---
I think Blake would have a better idea of B2G media requirements.
Flags: needinfo?(edwin) → needinfo?(bwu)
NI jsavory for B2G media user experience.
Flags: needinfo?(bwu) → needinfo?(jsavory)
There are enough complaints about pages automatically autoplaying undesired video and at really loud volume by default
Summary: Ooyala Player play's video automatically on page when it shouldn't → Video automatically on page when it shouldn't
I would agree that preventing auto-playing videos would probably benefit the users from not only a volume perspective but also possibly prevent extra data consumption. If we do need to include auto-play I would recommend that the volume of these videos follow the phone's volume setting as Karen has suggested. 

Since this is also a browser experience, flagging Francis to get his opinion on it as well.
Flags: needinfo?(jsavory) → needinfo?(fdjabri)
tracking-fennec: --- → ?
Keywords: productwanted
I'd hesitate to prevent auto-play of video elements. I'm seeing this being used increasingly on web sites (although not so much on mobile web sites) to give them impact, and when it's used correctly (without audio), it can certainly enhance the experience. I'd hate to put a blanket stop to all auto-play. But I'm certainly all in favor of making the audio follow the media volume on the device.
Flags: needinfo?(fdjabri)
I want to remain in complete control of my mobile, which includes *not* wanting videos to autoplay on the websites I am surfing. It is incredibly intrusive and it does NOT enhance the web experience on my phone in the least - in fact it makes me want to STOP browsing because of the sound at inopportune times. All I am pushing for is a setting to allow us to decide whether to enable auto-play or not. I don't care if it's default 'on', but I _need_ that control. I'm not the only one, after a straw poll of other typical phone users around me.
From the current WHATWG spec [1], 

"Authors are urged to use the autoplay attribute rather than using script to trigger automatic playback, as this allows the user to override the automatic playback when it is not desired, e.g. when using a screen reader. Authors are also encouraged to consider not using the automatic playback behavior at all, and instead to let the user agent wait for the user to start playback explicitly."

Obviously this not normative text, but I think the idea of having a pref to disable media autoplay falls into "allow[ing] the user to override the automatic playback when it is not desired".

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#attr-media-autoplay
I'd certainly be all in favor of having a user-setting to prevent autoplay of media. The only issue I would have would be in putting a blanket stop on it altogether.
Summary: Video automatically on page when it shouldn't → Video automatically plays on page when it shouldn't
tracking-fennec: ? → +
The spec allows us some leeway here. Sent a dev-platform post though to get some community feedback:
https://groups.google.com/forum/#!topic/mozilla.dev.platform/AlyLy1CHPvM
Thanks Wes. That just triggered my memory that Presto Opera had a option (hidden in opera:config) to disable autoplay, https://cloudup.com/cFSv1M_p9Oe
filter on [mass-p5]
Priority: -- → P5
Extracting this from the P5s. We should absolutely give users the option to not play videos automatically - it's simply too disruptive and often inappropriate when on mobile phones.
tracking-fennec: + → ?
Priority: P5 → --
Summary: Video automatically plays on page when it shouldn't → Video automatically plays on page when it should
tracking-fennec: ? → +
Assignee: nobody → liuche
Priority: -- → P2
Discussion mentioned that we have a pref already. We just need a Settings UI exposed for it.
Status: REOPENED → ASSIGNED
Component: General → Settings and Preferences
Adds the pref "Allow autoplay" with summary.
Attachment #8520054 - Flags: review?(bnicholson)
Attachment #8520053 - Attachment is obsolete: true
Robin, what do you think of these strings? I put this pref in Settings > Display - let me know if you want any changes.
Flags: needinfo?(randersen)
Attachment #8520054 - Flags: review?(bnicholson) → review+
I kinda wish we had Settings > Content (again) because this setting is definitely more "content" oriented. Settings > Display is more about the browser chrome, IIRC.
Yeah, I don't think Display is exactly the right place to put this either - I was oscillating between Display and Customize, neither of which is really the right place for it.

Another option could be to put another section into the Display preferences, for Content.
Settings > Display works, it's not a customization. If we foresee more content display preferences, I could see making another section, but it's fine for now.
Flags: needinfo?(randersen)
https://hg.mozilla.org/integration/fx-team/rev/b44752d08ebd
Target Milestone: --- → Firefox 36
https://hg.mozilla.org/mozilla-central/rev/b44752d08ebd
Status: ASSIGNED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
I too find it weird that this preference is in that section.
Verified as fixed in
Build:
Firefox for Android 36.a01 (2014-11-13)
Device:
Nexus 4 (Android 4.4.4)
Asus Transformer TF101 (Android 4.0.3)
Status: RESOLVED → VERIFIED
Flags: in-moztrap?(fennec)
Question:

I have noticed that playing videos are *extremely* sensitive to a tap now, whereas before you had to properly tap onto the video for it start playing.

It's so sensitive that even if I am just scrolling down (my ol' faithful m.bbc.co.uk/news), it takes the action of a 'scroll' as the tap it needs to start playing.

Can we ensure that you still require a directed 'tap' to start playing the video? Of course, I'm assuming that this change in nightly is related to this due to when this sensitivity cropped up. If this is another bug, let me know!
Video autoplay suite added in Moztrap: https://moztrap.mozilla.org/manage/cases/?filter-suite=801
Test cases:
Disabled Autoplay preference: https://moztrap.mozilla.org/manage/case/14987/
Autoplay preference enabled: https://moztrap.mozilla.org/manage/case/14986/
Flags: in-moztrap?(fennec) → in-moztrap+
I think it is not working. Or maybe the UI change is happened (because it exists and change the media.autoplay.enabled flag under about:config), but the function not works well.

Steps to reproduce:
1. Install Firefox beta (36.0) on Android (my device is Nexus5, stock Lollipop 5.0.1)
2. Uncheck "Allow autoplay" under Settings/Display
3. Open this url: http://www.nfl.com/news/story/0ap3000000471006/article/larry-fitzgerald-arizona-cardinals-finalize-new-deal
4. On the top of the page the video is downloading and started to play automatically

Another example is the following page, audio autostarts (without any controls, or I've just cannot cannot find them)
http://mmqb.si.com/2015/02/18/michael-sam-first-person-account-nfl-one-year-later/
Flags: needinfo?(liuche)
(In reply to tamas.barath from comment #45)
> I think it is not working. Or maybe the UI change is happened (because it
> exists and change the media.autoplay.enabled flag under about:config), but
> the function not works well.
> 
> Steps to reproduce:
> 1. Install Firefox beta (36.0) on Android (my device is Nexus5, stock
> Lollipop 5.0.1)
> 2. Uncheck "Allow autoplay" under Settings/Display
> 3. Open this url:
> http://www.nfl.com/news/story/0ap3000000471006/article/larry-fitzgerald-
> arizona-cardinals-finalize-new-deal
> 4. On the top of the page the video is downloading and started to play
> automatically
> 
> Another example is the following page, audio autostarts (without any
> controls, or I've just cannot cannot find them)
> http://mmqb.si.com/2015/02/18/michael-sam-first-person-account-nfl-one-year-
> later/

Known problem, some video players on some sites behave differently: bug 659285.
(In reply to Aaron Train [:aaronmt] from comment #46)
> (In reply to tamas.barath from comment #45)
> > I think it is not working. Or maybe the UI change is happened (because it
> > exists and change the media.autoplay.enabled flag under about:config), but
> > the function not works well.
> > 
> > Steps to reproduce:
> > 1. Install Firefox beta (36.0) on Android (my device is Nexus5, stock
> > Lollipop 5.0.1)
> > 2. Uncheck "Allow autoplay" under Settings/Display
> > 3. Open this url:
> > http://www.nfl.com/news/story/0ap3000000471006/article/larry-fitzgerald-
> > arizona-cardinals-finalize-new-deal
> > 4. On the top of the page the video is downloading and started to play
> > automatically
> Known problem, some video players on some sites behave differently: bug
> 659285.

Thanks.
I just cannot believe this bug is almost 4 years old bug...
This bug was just to add UI for this pref - see bug 659285.
Flags: needinfo?(liuche)
(In reply to Chenxia Liu [:liuche] (PTO until 1/9) from comment #48)
> This bug was just to add UI for this pref - see bug 659285.

Actually, *this* bug is about preventing autoplay of media. It's especially important for mobiles because it's both super annoying and consumes precious mobile data. The solution was to expose the flag. Which is good. But the browser is not working on all web sites.
Updating the bug title to be more specific and reflect the work actually associated with this bug.

If setting this pref is not working for some reason, let's get a new bug filed with steps to reproduce and the device/website where it's failing. (Bug 659285 may also contain relevant context.)
Summary: Video automatically plays on page when it should → Add UI for autoplay preference
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: