Link Search Menu Expand Document

VirtualLineInService

The VirtualLineInService is available on these models: v1-S1 / v1-S5 / v1-S9.

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.VirtualLineInService.OneOfTheMethodsBelow({...})

All actions that require input expect an object with the specified parameters, even if it only requires one parameter.

  1. Next
  2. Pause
  3. Play
  4. Previous
  5. SetVolume
  6. StartTransmission
  7. Stop
  8. StopTransmission
  9. VirtualLineInService event

Next

const result = await sonos.VirtualLineInService.Next({ InstanceID:... });

Input object:

property type description
InstanceID number  

This actions returns a boolean whether or not the requests succeeded.

Pause

const result = await sonos.VirtualLineInService.Pause({ InstanceID:... });

Input object:

property type description
InstanceID number  

This actions returns a boolean whether or not the requests succeeded.

Play

const result = await sonos.VirtualLineInService.Play({ InstanceID:..., Speed:... });

Input object:

property type description
InstanceID number  
Speed string  

This actions returns a boolean whether or not the requests succeeded.

Previous

const result = await sonos.VirtualLineInService.Previous({ InstanceID:... });

Input object:

property type description
InstanceID number  

This actions returns a boolean whether or not the requests succeeded.

SetVolume

const result = await sonos.VirtualLineInService.SetVolume({ InstanceID:..., DesiredVolume:... });

Input object:

property type description
InstanceID number  
DesiredVolume number  

This actions returns a boolean whether or not the requests succeeded.

StartTransmission

const result = await sonos.VirtualLineInService.StartTransmission({ InstanceID:..., CoordinatorID:... });

Input object:

property type description
InstanceID number  
CoordinatorID string  

Output object:

property type description
CurrentTransportSettings string  

Stop

const result = await sonos.VirtualLineInService.Stop({ InstanceID:... });

Input object:

property type description
InstanceID number  

This actions returns a boolean whether or not the requests succeeded.

StopTransmission

const result = await sonos.VirtualLineInService.StopTransmission({ InstanceID:..., CoordinatorID:... });

Input object:

property type description
InstanceID number  
CoordinatorID string  

This actions returns a boolean whether or not the requests succeeded.

VirtualLineInService event

const SonosDevice = require('@svrooij/sonos').SonosDevice
const sonos = new SonosDevice('192.168.x.x')
sonos.VirtualLineInService.Events('serviceEvent', (data) => {
  console.log(data);
});

The VirtualLineInService emits events with these properties. Not all properties are emitted every time.

parameter type possible values
AVTransportURIMetaData Track | string  
CurrentTrackMetaData Track | string  
CurrentTransportActions string  
EnqueuedTransportURIMetaData Track | string  
LastChange string  

This file is automatically generated with @svrooij/sonos-docs, do not edit manually.