Class: Kaltura::KalturaLiveChannelService

Inherits:
KalturaServiceBase show all
Defined in:
lib/kaltura_client.rb

Overview

Live Channel service lets you manage live channels

Instance Attribute Summary

Attributes inherited from KalturaServiceBase

#client

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ KalturaLiveChannelService

Returns a new instance of KalturaLiveChannelService.



2218
2219
2220
# File 'lib/kaltura_client.rb', line 2218

def initialize(client)
  super(client)
end

Instance Method Details

#add(live_channel) ⇒ Object

Adds new live channel.



2224
2225
2226
2227
2228
2229
2230
2231
2232
# File 'lib/kaltura_client.rb', line 2224

def add(live_channel)
  kparams = {}
  client.add_param(kparams, 'liveChannel', live_channel)
  client.queue_service_action_call('livechannel', 'add', 'KalturaLiveChannel', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#append_recording(entry_id, asset_id, media_server_index, resource, duration, is_last_chunk = false) ⇒ Object

Append recorded video to live entry



2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
# File 'lib/kaltura_client.rb', line 2298

def append_recording(entry_id, asset_id, media_server_index, resource, duration, is_last_chunk=false)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'assetId', asset_id)
  client.add_param(kparams, 'mediaServerIndex', media_server_index)
  client.add_param(kparams, 'resource', resource)
  client.add_param(kparams, 'duration', duration)
  client.add_param(kparams, 'isLastChunk', is_last_chunk)
  client.queue_service_action_call('livechannel', 'appendRecording', 'KalturaLiveEntry', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#delete(id) ⇒ Object

Delete a live channel.



2261
2262
2263
2264
2265
2266
2267
2268
2269
# File 'lib/kaltura_client.rb', line 2261

def delete(id)
  kparams = {}
  client.add_param(kparams, 'id', id)
  client.queue_service_action_call('livechannel', 'delete', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#get(id) ⇒ Object

Get live channel by ID.



2236
2237
2238
2239
2240
2241
2242
2243
2244
# File 'lib/kaltura_client.rb', line 2236

def get(id)
  kparams = {}
  client.add_param(kparams, 'id', id)
  client.queue_service_action_call('livechannel', 'get', 'KalturaLiveChannel', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#is_live(id) ⇒ Object

Delivering the status of a live channel (on-air/offline)



2286
2287
2288
2289
2290
2291
2292
2293
2294
# File 'lib/kaltura_client.rb', line 2286

def is_live(id)
  kparams = {}
  client.add_param(kparams, 'id', id)
  client.queue_service_action_call('livechannel', 'isLive', 'bool', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#list(filter = KalturaNotImplemented, pager = KalturaNotImplemented) ⇒ Object

List live channels by filter with paging support.



2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
# File 'lib/kaltura_client.rb', line 2273

def list(filter=KalturaNotImplemented, pager=KalturaNotImplemented)
  kparams = {}
  client.add_param(kparams, 'filter', filter)
  client.add_param(kparams, 'pager', pager)
  client.queue_service_action_call('livechannel', 'list', 'KalturaLiveChannelListResponse', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#register_media_server(entry_id, hostname, media_server_index, application_name = KalturaNotImplemented) ⇒ Object

Register media server to live entry



2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/kaltura_client.rb', line 2315

def register_media_server(entry_id, hostname, media_server_index, application_name=KalturaNotImplemented)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'hostname', hostname)
  client.add_param(kparams, 'mediaServerIndex', media_server_index)
  client.add_param(kparams, 'applicationName', application_name)
  client.queue_service_action_call('livechannel', 'registerMediaServer', 'KalturaLiveEntry', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#unregister_media_server(entry_id, hostname, media_server_index) ⇒ Object

Unregister media server from live entry



2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
# File 'lib/kaltura_client.rb', line 2330

def unregister_media_server(entry_id, hostname, media_server_index)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.add_param(kparams, 'hostname', hostname)
  client.add_param(kparams, 'mediaServerIndex', media_server_index)
  client.queue_service_action_call('livechannel', 'unregisterMediaServer', 'KalturaLiveEntry', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#update(id, live_channel) ⇒ Object

Update live channel. Only the properties that were set will be updated.



2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
# File 'lib/kaltura_client.rb', line 2248

def update(id, live_channel)
  kparams = {}
  client.add_param(kparams, 'id', id)
  client.add_param(kparams, 'liveChannel', live_channel)
  client.queue_service_action_call('livechannel', 'update', 'KalturaLiveChannel', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end

#validate_registered_media_servers(entry_id) ⇒ Object

Validates all registered media servers



2344
2345
2346
2347
2348
2349
2350
2351
2352
# File 'lib/kaltura_client.rb', line 2344

def validate_registered_media_servers(entry_id)
  kparams = {}
  client.add_param(kparams, 'entryId', entry_id)
  client.queue_service_action_call('livechannel', 'validateRegisteredMediaServers', '', kparams)
  if (client.is_multirequest)
    return nil
  end
  return client.do_queue()
end