Closed Bug 1476456 Opened Last year Closed Last year

Add telemetry to report whether autoplay would be blocked if autoplay was disabled by default

Categories

(Core :: Audio/Video: Playback, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We would like telemetry to help inform the decision around turning on block autoplay, and also to give the data science team some insights into the volume of pings they expect to receive for the shield study.

We'd like to add the following probes:

* Count of top level documents viewed; scalar uint.
* Count of top level documents which contained (directly or in a subdocument) playback of audible media elements; scalar uint.
* Count of top level documents which contained (directly or in a subdocument) muted videos that try to unmute but would have been paused due to block autoplay logic; scalar uint.
* Count of total number of videos that would have been blocked; scalar uint.
* Count of total videos that would not have been blocked; scalar uint.
Assignee: nobody → cpearce
Attachment #8992832 - Flags: review?(francois)
Comment on attachment 8992831 [details]
Bug 1476456 - Add telemetry to report whether autoplay would be not allowed if autoplay was disabled.

https://reviewboard.mozilla.org/r/257672/#review264768

::: dom/html/HTMLMediaElement.cpp:4068
(Diff revision 1)
>      return promise.forget();
>    }
>  
> +  // Telemetry.
> +  if (Volume() > 0.0 || !Muted()) {
> +    OwnerDoc()->SetDocTreeHadAudibleMedia();

should also need to add this check in CheckAutoplayDataReady().
Comment on attachment 8992832 [details]
Data collection request

1) Is there or will there be **documentation** that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes, in Scalars.yaml.

2) Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, telemetry setting.

3) If the request is for permanent data collection, is there someone who will monitor the data over time?**

Not permanent.

4) Using the **[category system of data types](https://wiki.mozilla.org/Firefox/Data_Collection)** on the Mozilla wiki, what collection type of data do the requested measurements fall under?  **

Category 1 (information about features and APIs used by websites).

5) Is the data collection request for default-on or default-off?

Default ON only in pre-release channels.

6) Does the instrumentation include the addition of **any *new* identifiers** (whether anonymous or otherwise; e.g., username, random IDs, etc.  See the appendix for more details)?

No.

7) Is the data collection covered by the existing Firefox privacy notice?

Yes

8) Does there need to be a check-in in the future to determine whether to renew the data?

No, telemetry alerts are fine.
Attachment #8992832 - Flags: review?(francois) → review+
Comment on attachment 8992831 [details]
Bug 1476456 - Add telemetry to report whether autoplay would be not allowed if autoplay was disabled.

https://reviewboard.mozilla.org/r/257672/#review264864

Scalars.yaml looks fine.
Attachment #8992831 - Flags: review?(francois) → review+
(In reply to Alastor Wu [:alwu] from comment #3)
> Comment on attachment 8992831 [details]
> Bug 1476456 - Add telemetry to report whether autoplay would be not allowed
> if autoplay was disabled.
> 
> https://reviewboard.mozilla.org/r/257672/#review264768
> 
> ::: dom/html/HTMLMediaElement.cpp:4068
> (Diff revision 1)
> >      return promise.forget();
> >    }
> >  
> > +  // Telemetry.
> > +  if (Volume() > 0.0 || !Muted()) {
> > +    OwnerDoc()->SetDocTreeHadAudibleMedia();
> 
> should also need to add this check in CheckAutoplayDataReady().

Indeed, thank you!
Comment on attachment 8992831 [details]
Bug 1476456 - Add telemetry to report whether autoplay would be not allowed if autoplay was disabled.

https://reviewboard.mozilla.org/r/257672/#review264712

::: dom/base/nsIDocument.h:3528
(Diff revision 1)
>     */
>    nsIContent* GetContentInThisDocument(nsIFrame* aFrame) const;
>  
>    void ReportShadowDOMUsage();
>  
> +  // Sets flags for media autoplay telemetry;

s/;/./ ?

::: dom/media/AutoplayPolicy.h:50
(Diff revision 1)
>    // Returns whether a given media element is allowed to play.
>    static Authorization IsAllowedToPlay(const HTMLMediaElement& aElement);
>  
> +  // Returns true if a given media element would be allowed to play
> +  // if block autoplay was enabled. If this returns false, it means we would
> +  // either block or ask for permisison.

permission
Attachment #8992831 - Flags: review?(amarchesini) → review+
Blocks: 1475099
Pushed by cpearce@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fdd6fe09e0d5
Add telemetry to report whether autoplay would be not allowed if autoplay was disabled. r=baku,francois
https://hg.mozilla.org/mozilla-central/rev/fdd6fe09e0d5
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.