Method: Ari::Channel.playWithId
- Defined in:
- lib/ari/resources/channel.rb
.playWithId ⇒ Object
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.
494 495 496 497 498 499 500 501 |
# File 'lib/ari/resources/channel.rb', line 494 def self.play_with_id( = {}) raise ArgumentError.new("Parameter channelId must be passed in options hash.") unless [:channelId] raise ArgumentError.new("Parameter playbackId must be passed in options hash.") unless [:playbackId] raise ArgumentError.new("Parameter media must be passed in options hash.") unless [:media] path = '/channels/%{channelId}/play/%{playbackId}' % response = client().post(path, ) Playback.new(response.merge(client: [:client])) end |