Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ The actions supported as of today:
* queue
* clearqueue
* sleep (values in seconds)
* linein (only analog linein, not PLAYBAR yet)
* linein
* clip (announce custom mp3 clip)
* clipall
* clippreset
Expand Down Expand Up @@ -732,6 +732,9 @@ Selects line-in on zone Office belongs to, with source Office.
`/Office/linein/TV%20Room`
Selects line-in for zone Office belongs to, with source TV Room.

`/Office/linein/TV%20Room/spdif`
Selects the spdif line-in for zone Office belongs to, with source TV Room, where TV Room is a playbar.

If you want to to isolate a player and then select line-in, use the `/Office/leave` first.

Clip
Expand Down
8 changes: 7 additions & 1 deletion lib/actions/linein.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

function linein(player, values) {
const sourcePlayerName = values[0];
const altInput = values[1];
let lineinSourcePlayer = player;

if (sourcePlayerName) {
Expand All @@ -11,8 +12,13 @@ function linein(player, values) {
if (!lineinSourcePlayer) {
return Promise.reject(new Error(`Could not find player ${sourcePlayerName}`));
}
let uri
if (altInput === "spdif") {
uri = `x-sonos-htastream:${lineinSourcePlayer.uuid}:spdif`;

const uri = `x-rincon-stream:${lineinSourcePlayer.uuid}`;
} else {
uri = `x-rincon-htastream:${lineinSourcePlayer.uuid}`;
}

return player.coordinator.setAVTransport(uri)
.then(() => player.coordinator.play());
Expand Down