[tor-bugs] #19193 [Applications/Tor Browser]: AudioContext, HTMLMediaElement, and MediaStream provide currentTime to content scripts
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri May 27 23:36:30 UTC 2016
#19193: AudioContext, HTMLMediaElement, and MediaStream provide currentTime to
content scripts
--------------------------------------+------------------------------
Reporter: arthuredelstein | Owner: tbb-team
Type: defect | Status: needs_review
Priority: Medium | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: TorBrowserTeam201605R | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------------------+------------------------------
Changes (by arthuredelstein):
* status: new => needs_review
* keywords: TorBrowserTeam201605 => TorBrowserTeam201605R
Old description:
> The worst offender is probably AudioContext, where you can get
> the current time thus:
>
> {{{
> var audioContext = new AudioContext();
> audioContext.currentTime;
> }}}
>
> Similarly, HTMLVideoElement.currentTime, HTMLAudioElement.currentTime,
> and CanvasCaptureMediaStream.currentTime can be used as a time source
> with resolution better than 10 ms.
New description:
The worst offender is probably AudioContext, where you can get
the current time thus:
{{{
var audioContext = new AudioContext();
audioContext.currentTime;
}}}
Similarly, HTMLVideoElement.currentTime, HTMLAudioElement.currentTime, and
CanvasCaptureMediaStream.currentTime can each be used as a time source
with resolution better than 10 ms.
--
Comment:
Here is a branch with two patches.
https://github.com/arthuredelstein/tor-browser/commits/19193
b91f47cce42a2e048f970a18710f9c15672a6cfc is a fixup for our #1517 patch
that rounds the values returned by the `currentTime` attributes mentioned
above.
936cadcc8dd2b0e6784be69cabe44880e36839b0 provides regression tests for all
time sources we are rounding in the old and new patches.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19193#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list