forked from securingsincity/pocket-casts-electron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththumbar.js
56 lines (52 loc) · 1.2 KB
/
thumbar.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const path = require("path");
module.exports = function(win) {
let pauseButtons = [
{
tooltip: "Skip Back",
icon: path.join(__dirname, "icons", "skipback.png"),
click() {
win.webContents.send("backward");
}
},
{
tooltip: "Pause",
icon: path.join(__dirname, "icons", "pause.png"),
click() {
win.setThumbarButtons(playButtons);
win.webContents.send("play-pause");
}
},
{
tooltip: "Skip Forward",
icon: path.join(__dirname, "icons", "skipforward.png"),
click() {
win.webContents.send("forward");
}
}
];
let playButtons = [
{
tooltip: "Skip Back",
icon: path.join(__dirname, "icons", "skipback.png"),
click() {
win.webContents.send("backward");
}
},
{
tooltip: "Play",
icon: path.join(__dirname, "icons", "play.png"),
click() {
win.setThumbarButtons(pauseButtons);
win.webContents.send("play-pause");
}
},
{
tooltip: "Skip Forward",
icon: path.join(__dirname, "icons", "skipforward.png"),
click() {
win.webContents.send("forward");
}
}
];
return playButtons;
};