Method: Ari::Channel.playWithId

Defined in:
lib/ari/resources/channel.rb

.playWithIdObject

POST /channels/%channelId/play/%playbackId

Play media to a channel

Parameters:

channelId (required) - Channel’s id playbackId (required) - Playback ID. media (required) - Media’s URI to play. lang - For sounds, selects language for sound. offsetms - Number of media to skip before playing. skipms - Number of milliseconds to skip for forward/reverse operations.

Raises:

  • (ArgumentError)


494
495
496
497
498
499
500
501
# File 'lib/ari/resources/channel.rb', line 494

def self.play_with_id(options = {})
  raise ArgumentError.new("Parameter channelId must be passed in options hash.") unless options[:channelId]
  raise ArgumentError.new("Parameter playbackId must be passed in options hash.") unless options[:playbackId]
  raise ArgumentError.new("Parameter media must be passed in options hash.") unless options[:media]
  path = '/channels/%{channelId}/play/%{playbackId}' % options
  response = client(options).post(path, options)
  Playback.new(response.merge(client: options[:client]))
end