corporateacademy-dam

Methods

(static) createAttachment(entryId, title, token) → {Item}

Function that load an attachment in Kaltura

Parameters:
Name Type Description
entryId string

Required by the action: The Kaltura entry id of the object "parent" of this attachment

title string

Required by the action: The name in Kaltura

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/create-attachment
Returns:

The new created Item attachment

Type
Item

(static) createMultimediaItem(fileFullPath, fileName, title, subTitle, description, externalLinks, itemType, draftOnly, indexItem, skipPublicVisibility, fileType, itemId, useCoreUpload, token) → {string}

Function that prepare a new entry (video/audio/image) in Kaltura

Parameters:
Name Type Description
fileFullPath string

Required by the action: The file name with full path

fileName string

Required by the action: The file name saved in Kaltura

title string

Required by the action: The name in Kaltura

subTitle string

Optional by the action: The subtitle of the item

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

itemType string

Optional for the action: The item type

draftOnly boolean

Optional for the action: If true the document is saved as draft and it will not be active

indexItem boolean

Optional for the action: If true the item will be indexed (default: true)

skipPublicVisibility boolean

Optional for the action: If true the public visibility will be skipped

fileType number

Required by the action: KalturaAttachmentType: 1 (video), 2 (image), 5 (audio), 201 (live stream flash), 202 (live stream windows media), 203 (live stream real media), 204 (live stream quicktime)

itemId string

Required by the action: the item that has to be used as referenceId when "useCoreUpload" case is true

useCoreUpload boolean

Optional by the action: the flag that indicates when to use the core-upload

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/create-multimedia-item
Returns:

The attachmentId of the attachment

Type
string

(static) createMultimediaItemInner(fileFullPath, fileName, title, subTitle, description, externalLinks, itemType, files, draftOnly, indexItem, skipPublicVisibility, fileType, token) → {string}

Function that load a new entry (video/audio/image) in Kaltura

Parameters:
Name Type Description
fileFullPath string

Required by the action: The file name with full path

fileName string

Required by the action: The file name saved in Kaltura

title string

Required by the action: The name in Kaltura

subTitle string

Optional by the action: The subtitle of the item

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

itemType string

Optional for the action: The item type

files any

Required for the action: the files to upload

draftOnly boolean | string

Optional for the action: If true the document is saved as draft and it will not be active

indexItem boolean

Optional for the action: If true the item will be indexed (default: true)

skipPublicVisibility boolean

Optional for the action: If true the public visibility will be skipped

fileType number

Required by the action: KalturaAttachmentType: 1 (video), 2 (image), 5 (audio), 201 (live stream flash), 202 (live stream windows media), 203 (live stream real media), 204 (live stream quicktime)

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/create-multimedia-item-inner
Returns:

The attachmentId of the attachment

Type
string

(static) createOtherItem(item, fileFullPath, fileName, title, subTitle, description, externalLinks, fileType, token) → {string}

Function that load a new entry (video/audio/image) in Kaltura

Parameters:
Name Type Description
item Item

Required by the action: The item object with alla relevant data set

fileFullPath string

Required by the action: The file name with full path

fileName string

Required by the action: The file name saved in Kaltura

title string

Required by the action: The name in Kaltura

subTitle string

Optional by the action: The subtitle of the item

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

fileType number

Required by the action: KalturaAttachmentType: 1 (video), 2 (image), 5 (audio), 201 (live stream flash), 202 (live stream windows media), 203 (live stream real media), 204 (live stream quicktime)

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/create-other-item
Returns:

The attachmentId of the attachment

Type
string

(static) deleteMultimediaItem(fileName, title, subTitle, objectType, description, externalLinks, itemType, fileType, langCode, itemId, materialType, token) → {string}

Function that load a new entry (video/audio/image) in Kaltura

Parameters:
Name Type Description
fileName string

Required by the action: The file name saved in Kaltura

title string

Required by the action: The name in Kaltura

subTitle string

Optional by the action: The subtitle of the item

objectType string

Required by the action: The object type (PODCAST, BOOK, VIDEO...)

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

itemType string

Optional for the action: The item type

fileType number

Required by the action: KalturaAttachmentType: 1 (video), 2 (image), 5 (audio), 201 (live stream flash), 202 (live stream windows media), 203 (live stream real media), 204 (live stream quicktime)

langCode string

Optional by the action: The langCode for which the user is working on the FE (it's the user's langCode if not choosed from the frontend)

itemId string

Required by the action: Specified whenever is required to create a session with Kaltura in the upload

materialType string

Required by the action: The type of material (see ItemAttributeMaterialTypes)

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/delete-multimedia-item/:itemId
Returns:

The attachmentId of the attachment

Type
string

(static) getAttachmentUrl(attachmentId, adminMode, adminMode, item, isItemOtherType, forceCreateConsumedEngagement, forcedItemIdEngagement, token) → {string}

Function that retrieve the url of an attachment id passed.

Parameters:
Name Type Description
attachmentId string

Required by the action: The attachment id to retrieve

adminMode boolean | string

Optional for the action: If false it will update the Item adding a 'consumed' event

adminMode boolean

Optional for the action: If false it will update the Item adding a 'consumed' event

item Item

Optional for the action: The item to update if adminMode is false

isItemOtherType boolean | string

Optional for the action: Check if the item is 'other' type (so an ebook, a graph or document)

forceCreateConsumedEngagement boolean | string

Optional for the action: If true, it will create the consumed engagement

forcedItemIdEngagement boolean | string

Optional for the action: If passed this itemId will be used to trace the consumed engagement

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/get-attachment-url/:attachmentId
Returns:

The URL to download the attachment

Type
string

(static) updateMultimediaItem(fileName, title, subTitle, objectType, description, externalLinks, itemType, fileType, langCode, itemId, materialType, token) → {string}

Function that load a new entry (video/audio/image) in Kaltura

Parameters:
Name Type Description
fileName string

Required by the action: The file name saved in Kaltura

title string

Required by the action: The name in Kaltura

subTitle string

Optional by the action: The subtitle of the item

objectType string

Required by the action: The object type (PODCAST, BOOK, VIDEO...)

description string

Optional by the action: The description of the item

externalLinks Array.<string>

Optional by the action: The list of the external Link

itemType string

Optional for the action: The item type

fileType number

Required by the action: KalturaAttachmentType: 1 (video), 2 (image), 5 (audio), 201 (live stream flash), 202 (live stream windows media), 203 (live stream real media), 204 (live stream quicktime)

langCode string

Optional by the action: The langCode for which the user is working on the FE (it's the user's langCode if not choosed from the frontend)

itemId string

Required by the action: Specified whenever is required to create a session with Kaltura in the upload

materialType string

Required by the action: The type of material (see ItemAttributeMaterialTypes)

token string

Required: the Authorization Bearer token passed in the Header of the request

Listens to Events:
  • event:HTTP POST /rest-api/corporateacademy-mediator/update-multimedia-item
Returns:

The attachmentId of the attachment

Type
string