Class: Vonage::Video::Renders

Inherits:
Namespace
  • Object
show all
Defined in:
lib/vonage/video/renders.rb

Defined Under Namespace

Classes: ListResponse

Instance Method Summary collapse

Instance Method Details

#info(experience_composer_id:) ⇒ Response

Get information about an Experience Composer session

Examples:

response = client.video.renders.info(experience_composer_id: "1248e7070b81464c9789f46ad10e7764")

Returns:

See Also:

  • Add document link here


83
84
85
# File 'lib/vonage/video/renders.rb', line 83

def info(experience_composer_id:)
  request('/v2/project/' + @config.application_id + '/render/' + experience_composer_id)
end

#list(**params) ⇒ Video::Renders::ListResponse

List all Experience Composer renders in an application

Examples:

response = client.video.renders.list

Returns:

See Also:

  • Add document link here


100
101
102
103
104
105
# File 'lib/vonage/video/renders.rb', line 100

def list(**params)
  path = '/v2/project/' + @config.application_id + '/render'
  path += "?#{Params.encode(camelcase(params))}" unless params.empty?

  request(path, response_class: ListResponse)
end

#start(session_id:, token:, url:, **params) ⇒ Response

Start an Experience Composer Render

Examples:

response = client.video.renders.start(
  session_id: "12312312-3811-4726-b508-e41a0f96c68f",
  token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJp...",
  url: 'https://example.com/',
  max_duration: 1800,
  resolution: '1280x720',
  properties: {
    name: 'foo'
  }
)

Parameters:

  • :token (required, String)

    A valid OpenTok JWT token with a Publisher role and (optionally) connection data to be associated with the output stream.

  • properties (Hash)

    a customizable set of options

Returns:

See Also:

  • Add document link here


50
51
52
53
54
55
# File 'lib/vonage/video/renders.rb', line 50

def start(session_id:, token:, url:, **params)
  request(
    '/v2/project/' + @config.application_id + '/render',
    params: camelcase(params.merge({sessionId: session_id, token: token, url: url})),
    type: Post)
end

#stop(experience_composer_id:) ⇒ Response

Stop an Experience Composer render

Examples:

response = client.video.renders.stop(experience_composer_id: "1248e7070b81464c9789f46ad10e7764")

Returns:

See Also:

  • Add document link here


68
69
70
# File 'lib/vonage/video/renders.rb', line 68

def stop(experience_composer_id:)
  request('/v2/project/' + @config.application_id + '/render/' + experience_composer_id, type: Delete)
end