-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathplayback.js
28 lines (22 loc) · 840 Bytes
/
playback.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
const SonosDevice = require('../lib').SonosDevice
const sonos = new SonosDevice(process.env.SONOS_HOST || '192.168.96.56')
// sonos.TogglePlayback()
// .then(success => console.log(success))
// .catch(err => console.error(err))
// sonos.AVTransportService.GetPositionInfo()
// .then(response => {
// console.log(JSON.stringify(response, null, 2))
// })
// .catch(err => console.error(err))
// // sonos.AddUriToQueue('spotify:track:7dVjKRYCkszdHEHIBj9OMc')
// // .then(success => console.log(success))
// // .catch(err => console.error(err))
// sonos.SetAVTransportURI('x-sonosapi-stream:station_KISNFM?sid=162')
// .then(success => {
// return sonos.Play()
// })
// .catch(console.error)
sonos.AVTransportService.Play({ InstanceID: 0, Speed: '1' })
.catch(err => {
console.log('Sonos error', err)
})