lib/sonos/features/voiceover.rb
# Interrupts the speaker and plays the provided URI. When finished, returns the play head
# and state to their original position. Useful for doorbell sounds, announcements, etc.
Interrupts the speaker and plays the provided URI. When finished, returns the play head
and state to their original position. Useful for doorbell sounds, announcements, etc.
Interrupts the speaker and plays the provided URI . When finished returns the play head and state to their original position . Useful for doorbell sounds announcements etc .
def voiceover!(uri, vol = nil)
    start_time = Time.now
    result = group_master.with_isolated_state do
      self.volume = vol if vol
      group_master.play_blocking(uri)
    end
    result.merge({duration: (Time.now - start_time )})
  end
def voiceover! ( uri , vol = nil ) start_time = Time . now result = group_master . with_isolated_state do self . volume = vol if vol group_master . play_blocking ( uri ) end result . merge ( { duration : ( Time . now - start_time ) } ) end
Interrupts the speaker and plays the provided URI.
Interrupts the speaker and plays the provided URI .
uri
<not_specific>
vol
<not_specific>