Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Music on vk.com may not play reliably #11988

Closed
jonathansampson opened this issue Nov 15, 2017 · 1 comment · Fixed by brave/muon#394
Closed

Music on vk.com may not play reliably #11988

jonathansampson opened this issue Nov 15, 2017 · 1 comment · Fixed by brave/muon#394
Assignees
Labels
bug duplicate Issue has already been reported webcompat

Comments

@jonathansampson
Copy link
Collaborator

jonathansampson commented Nov 15, 2017

Description

The music player on vk.com may not play music reliably.

Steps to Reproduce

  1. Sign up if necessary
  2. Select Music from the left
  3. Press the play button on whatever is loaded

Actual result:
Music does not play. The console has the following error:

Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.

The user may also see the following dialog:

An error occurred while downloading the audio file. Please refreshing the page.

Expected result:
Music should play.

Reproduces how often:
The first time you interact with the audio player.

Brave Version

0.19.88

about:brave info:

Brave: 0.19.88 
rev: c29eca63249e3d43584ca1dcc47f3e7a7e904324 
Muon: 4.5.15 
libchromiumcontent: 62.0.3202.89 
V8: 6.2.414.40 
Node.js: 7.9.0 
Update Channel: Release 
OS Platform: Microsoft Windows 
OS Release: 10.0.16299 
OS Architecture: x64

Reproducible on current live release:
Yes

Additional Information

#11527

Reported on Twitter: https://twitter.com/HammerCorsa/status/930878637095751681

The relevant JavaScript:

AudioPlayerHTML5.prototype.play = function(t) {
    this._stopFrequencyAnalise(),
    this._prefetchAudioEl.src == (0,
        _audio_unmask_source.audioUnmaskSource)(t) 
        && this._prefetchAudioEl.readyState > AudioPlayerHTML5.STATE_HAVE_NOTHING 
        && (this._setAudioNodeUrl(this._currentAudioEl, AudioPlayerHTML5.SILENCE),
        this._currentAudioEl = this._prefetchAudioEl,
        this._prefetchAudioEl = this._createAudioNode(),
        this.opts.onCanPlay && this.opts.onCanPlay()
    );
    var e = this._currentAudioEl;
    if (e.src) {
        var i = e.play();
        isUndefined(i) || i["catch"](function(t) {
            t.code != t.ABORT_ERR 
                ? setWorkerTimeout(function() {
                      triggerEvent(e, "error", !1, !0)
                   }, 10) 
                : debugLog("HTML5 audio play error: " + t)
        }),
        this._startFrequencyAnalise()
    }
}
@jonathansampson jonathansampson added bug needs-investigation A bug not 100% confirmed/fixed that needs QA to better audit. webcompat labels Nov 15, 2017
@darkdh darkdh self-assigned this Nov 17, 2017
@bsclifton bsclifton added this to the Triage Backlog milestone Nov 27, 2017
darkdh added a commit to brave/muon that referenced this issue Dec 1, 2017
darkdh added a commit to brave/muon that referenced this issue Dec 1, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 18, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 21, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 27, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 29, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 29, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 29, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
darkdh added a commit to brave/muon that referenced this issue Dec 29, 2017
fix brave/browser-laptop#11988
fix brave/browser-laptop#11527

2. Don't check user initiated video
fix brave/browser-laptop#12149

3. Default allow muted media
fix brave/browser-laptop#12152

4. Default allow for local files
fix brave/browser-laptop#8929

Auditors: @bridiver, @bbondy, @bsclifton
@darkdh darkdh modified the milestones: Triage Backlog, 0.20.x (Beta Channel) Dec 29, 2017
@bsclifton bsclifton removed the needs-investigation A bug not 100% confirmed/fixed that needs QA to better audit. label Jan 4, 2018
@bsclifton bsclifton removed this from the 0.20.x (Beta Channel) milestone Jan 4, 2018
@bsclifton bsclifton added the duplicate Issue has already been reported label Jan 4, 2018
@bsclifton
Copy link
Member

Removing milestone, added dupe tag; this is a duplicate of #11527

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug duplicate Issue has already been reported webcompat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants