Bug 411423 - Youtube media controls no longer show up
Summary: Youtube media controls no longer show up
Status: RESOLVED FIXED
Alias: None
Product: plasma-browser-integration
Classification: Plasma
Component: Firefox (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 14:27 UTC by Tasos Sahanidis
Modified: 2019-08-29 17:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tasos Sahanidis 2019-08-29 14:27:37 UTC
SUMMARY

Version 1.6 of the plasma integration addon completely breaks the Youtube player's media controls on Waterfox 56.2.13. The controls do not show up at all, and keyboard keys such as `K` no longer play/pause/resume the video.

STEPS TO REPRODUCE
1. Update to version 1.6
2. Open a Youtube video
3. Try to interact with the player

OBSERVED RESULT

No controls ever show up. Can't pause by clicking the video, and keyboard shortcuts to not work.

EXPECTED RESULT

Controls show up and keyboard shortcuts work.

SOFTWARE/OS VERSIONS

Operating System: KDE neon 5.16
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.12.3
Kernel Version: 5.2.0
OS Type: 64-bit
Processors: 4 × Intel® Core™2 Quad CPU Q6600 @ 2.40GHz
Memory: 7,8 GiB of RAM

ADDITIONAL INFORMATION

Downgrading to 5.15, the previous version, corrects this issue.
Manually enabling `Enhanced Media Controls` on version 5.15 does _not_ cause any of these issues.
Comment 1 Kai Uwe Broulik 2019-08-29 15:11:03 UTC
Looks like Waterfox doesn't like calling window.postMessage(foo) with just one argument. It requires the targetOrigin argument. Patch: https://phabricator.kde.org/D23568
Technically a bug on our side caused by poor docs, lack of my reading skills, and lenient behavior on browser side. Note that Waterfox isn't officially supported by us.
Comment 2 Tasos Sahanidis 2019-08-29 15:23:29 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Looks like Waterfox doesn't like calling window.postMessage(foo) with just
> one argument. It requires the targetOrigin argument. Patch:
> https://phabricator.kde.org/D23568
> Technically a bug on our side caused by poor docs, lack of my reading
> skills, and lenient behavior on browser side. Note that Waterfox isn't
> officially supported by us.

Thank you for the quick reply and for the patch. I will test it later this evening.

That said, the same issue happens on Firefox 60 ESR which if I am not mistaken is still supported.
Comment 3 Kai Uwe Broulik 2019-08-29 16:31:36 UTC
Oh, good point about the ESR. I thought they still did the old extension stuff but that was 57, not 60.
Comment 4 Kai Uwe Broulik 2019-08-29 17:06:41 UTC
Git commit 1eda6e4387da9a71574b2d9c3cf8ff35393a4514 by Kai Uwe Broulik.
Committed on 29/08/2019 at 17:06.
Pushed by broulik into branch 'master'.

Use custom event rather than window.postMessage

window.postMessage requires a targetOrigin which isn't enforced by all browsers.
This patch changes it to send a custom event which reduces the likelihood of interference and eavesdropping.

Differential Revision: https://phabricator.kde.org/D23568

M  +8    -9    extension/content-script.js

https://commits.kde.org/plasma-browser-integration/1eda6e4387da9a71574b2d9c3cf8ff35393a4514