Method: Plivo::Resources::CallInterface#play

Defined in:
lib/plivo/resources/calls.rb

#play(call_uuid, urls, options = nil) ⇒ Object

Parameters:

  • call_uuid (String)
  • urls (Array)
  • options (Hash) (defaults to: nil)

Options Hash (options):

  • :urls (Array of strings)
    • A single URL or a list of comma separated URLs linking to an mp3 or wav file.

  • :length (Int)
    • Maximum length in seconds that the audio should be played.

  • :legs (String)
    • The leg on which the music will be played, can be aleg (i.e., A-leg is the first leg of the call or current call), bleg (i.e., B-leg is the second leg of the call),or both (i.e., both legs of the call).

  • :loop (Boolean)
    • If set to true, the audio file will play indefinitely.

  • :mix (Boolean)
    • If set to true, sounds are mixed with current audio flow.



505
506
507
508
509
# File 'lib/plivo/resources/calls.rb', line 505

def play(call_uuid, urls, options = nil)
  valid_param?(:call_uuid, call_uuid, [String, Symbol], true)
  valid_param?(:urls, urls, Array, true)
  Call.new(@_client, resource_id: call_uuid).play(urls, options)
end