Also store the player's frame ID

Authored by broulik on Jun 3 2019, 7:03 AM.

Description

Also store the player's frame ID

The extension is also injected into iframes on a website. They share the same tab id as the rest of the website, so when having multiple
videos embedded as iframes, they all get mpris signals relayed to them, causing e.g. a play command to suddenly start playing all of them.
This patch introduces a playerId which is basically tabId-frameId (with "0" being the main page) and uses that for identifying players.
The code is also simplified a bit by having a sendPlayerTabMessage function which checks for a player being present (instead of
having the caller do that everywhere) and then sends it to the appropriate tabId and frameId combination.

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

Details

Committed
broulikJun 3 2019, 7:03 AM
Differential Revision
D21038: Also store the player's frame ID
Parents
R856:1dbff33faa54: SVN_SILENT made messages (.desktop file) - always resolve ours
Branches
Unknown
Tags
Unknown