Register players when tab becomes audible
AbandonedPublic

Authored by broulik on May 20 2018, 11:47 AM.

Details

Reviewers
davidedmundson
fvogt
Group Reviewers
Plasma
Summary

When a tab becomes audible (ie. the playing sound icon shows up), register all players on the site.
This ensures dynamically created players that weren't registred by our DOM mutation observer are also handled.

Test Plan

Opened a twitter video, I clicked on it so it started playing with sound, now I can control it. Previously it would not detect it.

Could also cause unintended side-effects if another tab starts playing sound suddenly?

I don't fully understand why neither createElement nor the mutation observer detect it, though.

Diff Detail

Repository
R856 Plasma Browser Integration
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.May 20 2018, 11:47 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 20 2018, 11:47 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.May 20 2018, 11:47 AM

I don't fully understand why neither createElement nor the mutation observer detect it, though.

IMO that should be debugged a bit further before landing this, as it's AFACIT only a hack.

broulik abandoned this revision.May 21 2018, 12:47 PM

I like Fabian's approach better