Class: WscSdk::Templates::CustomStreamTarget

Inherits:
ModelTemplate show all
Defined in:
lib/wsc_sdk/templates/custom_stream_target.rb

Overview

Templates for generating Custom Stream Targets

Class Method Summary collapse

Methods inherited from ModelTemplate

merge

Class Method Details

.akamai_hd(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build an Akamai HLS custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



27
28
29
30
31
32
33
34
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 27

def self.akamai_hd(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::AKAMAI_HD,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end

.akamai_hls(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build an Akamai HD custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



50
51
52
53
54
55
56
57
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 50

def self.akamai_hls(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::AKAMAI_HLS,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end

.akamai_rtmp(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build an Akamai RTMP custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



73
74
75
76
77
78
79
80
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 73

def self.akamai_rtmp(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::AKAMAI_RTMP,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end

.limelight(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build a Limelight custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



97
98
99
100
101
102
103
104
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 97

def self.limelight(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::LIMELIGHT,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end

.rtmp(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build an RTMP custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



120
121
122
123
124
125
126
127
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 120

def self.rtmp(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::RTMP,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end

.ustream(name, primary_url, stream_name, modifiers = {}) ⇒ Object

A template to build an UStream custom stream target

Parameters:

  • name (String)

    The name of the transcoder

  • primary_url (String)

    The primary URL of the stream target.

  • stream_name (String)

    The name of the stream.

  • modifiers (Hash) (defaults to: {})

    A hash of key/value modifiers to change data in the template.



143
144
145
146
147
148
149
150
# File 'lib/wsc_sdk/templates/custom_stream_target.rb', line 143

def self.ustream(name, primary_url, stream_name, modifiers={})
  self.merge({
    name:                         name,
    provider:                     WscSdk::Enums::CustomProvider::USTREAM,
    primary_url:                  primary_url,
    stream_name:                  stream_name
  }, modifiers)
end