-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from alfstorm/nrk-css-selector
Changed nrkradio to use CSS selector instead of API call.
- Loading branch information
Showing
2 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
/* | ||
* NRK radio only supports a flash player on chrome desktop at the moment, | ||
* so we have to talk to an api in the browser window to get media buttons working. | ||
*/ | ||
|
||
injectionInit(function (key) { | ||
if (key === "play-pause") { | ||
nrk.modules.player.getApi().toggleplay(); | ||
function onKeyPress(key) { | ||
if (key === PLAY) { | ||
var playPauseButton = document.querySelector('button.ludo-bar__button--playpause'); | ||
simulateClick(playPauseButton); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters