We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51de358 commit 4c9b66fCopy full SHA for 4c9b66f
lib/actions/linein.js
@@ -0,0 +1,22 @@
1
+'use strict';
2
+
3
+function linein(player, values) {
4
+ const sourcePlayerName = values[0];
5
+ let lineinSourcePlayer = player;
6
7
+ if (sourcePlayerName) {
8
+ lineinSourcePlayer = player.system.getPlayer(decodeURIComponent(sourcePlayerName));
9
+ }
10
11
+ if (!lineinSourcePlayer) {
12
+ return Promise.reject(new Error(`Could not find player ${sourcePlayerName}`));
13
14
15
+ const uri = `x-rincon-stream:${lineinSourcePlayer.uuid}`;
16
17
+ return player.coordinator.setAVTransport(uri);
18
+}
19
20
+module.exports = function (api) {
21
+ api.registerAction('linein', linein);
22
0 commit comments