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
parent
1dbff33f
Please register or sign in to comment