Create

Create a new player.

Tokens

This action requires the following tokens:

  • player-write

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
name String   The name for the new player
fallbackbehavior String No

The fallback behavior for the new player

This argument can only contain one of the following values:

  • No
  • LegacyWhenNeeded
  • AlwaysLegacy
defaultembedframewidth Integer 640 The default width for the embed frame of this player
defaultembedframeheight Integer 360 The default height for the embed frame of this player
showtitle Boolean true Whether to show a title for items in this player
autoplay Boolean false Whether autoplay is enabled by default for the new player
advertisementtag String   The advertisement tag (URL) for the new player
advertisementtimeout String 5000 The advertisement timeout for the new player in milliseconds
skin Hash   The skin for the new player
leaderitem Hash   The leaderitem for the new player
leaderitemskippableafter Duration   After what time the leader item can be skipped. If not set, the leader item can not be skipped
googleanalyticstag String   The tag to use for Google Analytics for the new player
airplayenabled Boolean true Whether Airplay is enabled for the new player
adblockmaxheight Integer   The maximum height for videos streamed by the new player when an adblocker has been detected
adblockmessageenabled Boolean false Whether to show a message when an adblocker has been detected for the new player
adblockmessage String   The message to show when an adblocker has been detected for the new player. If empty, use a default message
adblockmessagecloseable Boolean true Whether the adblocker-detection message is closeable for the new player
adblockmessagerepeattime Integer 0 After how many seconds to show the adblocker-detection message again. If 0 the message will repeat every time and if omitted the message will never repeat
autoplaynextenabled Boolean false Whether AutoPlayNext is enabled for the new player
autoplaynexttimeout Integer 10 After how many seconds to invoke AutoPlayNext after a playlist has ended
autoplaynextfollow String FirstVideo

What to follow when AutoPlayNext is invoked for the new player

This argument can only contain one of the following values:

  • FirstVideo
  • FirstWebsite
  • First
embedcodeenabled Boolean true Whether the embed code is enabled for the new player. See Player for more information
relatedarticlebuttonenabled Boolean false Whether the related article button is shown in the new player when an item with an external link is viewed.
shareenabled Boolean true Whether sharing options are enabled in the new player.
shareplayer Hash   The share player to use for the new player
recommendedcontentmode Label disabled

The mode of recommended content to use

This argument can only contain one of the following values:

  • disabled
  • top
  • external
recommendedcontentexternallinktemplate String  

The link template to use for external recommended content. Can contain the following variables:

  • %ACCOUNT%: will be replaced by the account ID
  • %ITEM%: will be replaced by the item ID
  • %EXTERNALID%: will be replaced by the external ID of the item
recommendedcontenttype Label playlist

Type of recommended content items to generate for the new player

This argument can only contain one of the following values:

  • playlist
  • link
recommendedcontentlinktemplate String  

The link template to use for recommended content when the mode is top. Can contain the following variables:

  • %ACCOUNT%: will be replaced by the account ID
  • %ITEM%: will be replaced by the item ID
  • %EXTERNALID%: will be replaced by the external ID of the item
recommendedcontentlinktarget Label fullbody

Target for recommended content links

This argument can only contain one of the following values:

  • ownframe
  • fullbody
recommendedcontenttopmaxage Integer 48 Age (in hours) to use for top recommended content
recommendedcontenttopaccounts String   Comma-separated list of account ID’s to use for top recommended content
recommendedcontentmaxitems Integer 50 Maximum number of recommended content items to use

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash Player ID
name String Player name
fallbackbehavior String The fallback behavior for this player
defaultembedframewidth Integer Default embed frame width for this player
defaultembedframeheight Integer Default embed frame height for this player
advertisementtag String Advertisement tag for this player
advertisementtimeout Integer Advertisement timeout for this player in milliseconds
datecreated DateTime Date and time this player was created
datemodified DateTime Date and time this player was last modified
showtitle Boolean Whether to show the title of items in the player
autoplay Boolean Whether autoplay is enabled for this player by default
skin

Skin for this player

The value of this field is an object containing the following fields:

Name Type Description
id Hash Player skin ID
url String Player skin URL
description String Player skin description
datecreated DateTime When the player skin was created
datemodified DateTime When the player skin was last modified
account

Account for this player skin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
customer

Customer for this player skin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
user

User that created this player

The value of this field is an object containing the following fields:

Name Type Description
id Hash User ID
username String User name
account

Account this player belongs to

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
customer

Customer this player belongs to

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
leaderitem

Leader item for this player

The value of this field is an object containing the following fields:

Name Type Description
id Hash Item ID
title String Title of the item
description String Description of the item
type Label The type of this item; for available item types, refer to the documentation of the Item command
account

The account that created this item

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
datecreated DateTime When this item was created; for recordings of live-events, this is the date when the item finished recording
leaderitemskippableafter Duration The time after which the leader item can be skipped
googleanalyticstag String The Google Analytics tag for this player
airplayenabled Boolean Whether Airplay is enabled for this player
adblockmaxheight Integer The maximum height of videos to display when an adblocker has been detected for this player
adblockmessageenabled Boolean Whether a message will be shown when an adblocker has been detected for this player
adblockmessage String The message to display when an adblocker has been detected
adblockmessagecloseable Boolean Whether the adblocker-detection messsage is closeable
adblockmessagerepeattime Integer After how many seconds to repeat the adblocker-detection message again
autoplaynextenabled Boolean Whether AutoPlayNext is enabled for this player
autoplaynexttimeout Integer After how many seconds to automatically play the next item
autoplaynextfollow String What to automatically follow when AutoPlayNext is triggered
embedcodeenabled Boolean Whether the embed code is enabled for this player. See Player for more information
relatedarticlebuttonenabled Boolean Whether the related article button is shown in this player when an item with an external link is viewed.
shareenabled Boolean Whether the sharing options are enabled in this player
shareplayer

Share player of this player

The value of this field is an object containing the following fields:

Name Type Description
id Hash Player ID
name String Player name
fallbackbehavior String The fallback behavior for this player
defaultembedframewidth Integer Default embed frame width for this player
defaultembedframeheight Integer Default embed frame height for this player
advertisementtag String Advertisement tag for this player
advertisementtimeout Integer Advertisement timeout for this player in milliseconds
datecreated DateTime Date and time this player was created
datemodified DateTime Date and time this player was last modified
showtitle Boolean Whether to show the title of items in the player
autoplay Boolean Whether autoplay is enabled for this player by default
skin

Skin for this player

The value of this field is an object containing the following fields:

Name Type Description
id Hash Player skin ID
url String Player skin URL
description String Player skin description
datecreated DateTime When the player skin was created
datemodified DateTime When the player skin was last modified
account

Account for this player skin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
customer

Customer for this player skin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
recommendedcontent

The recommended content related settings for this player

The value of this field is an object containing the following fields:

Name Type Description
mode Label The mode of recommended content to use. disabled to disable, top to use top content or external to use an external link
externallinktemplate String

The link template to use for recommended content when the mode is external. Can contain the following variables:

  • %ACCOUNT%: will be replaced by the account ID
  • %ITEM%: will be replaced by the item ID
  • %EXTERNALID%: will be replaced by the external ID of the item
type Label
The type of recommended content to generate when the mode is top. playlist to generate links to playlists for the items or link to
generate URL’s according to the link template
linktemplate String

The link template to use for recommended content when the mode is top. Can contain the following variables:

  • %ACCOUNT%: will be replaced by the account ID
  • %ITEM%: will be replaced by the item ID
  • %EXTERNALID%: will be replaced by the external ID of the item
linktarget Label HTML target for the link when the mode is top. ownframe to open in the player frame or fullbody to open in the full body
topmaxage Integer Maximum age of top content to use when the mode is top
topaccounts

Accounts to use for top content. If empty only use the account of the item

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
maxitems Integer Maximum number of recommended content items to show when the mode is top
plugins

The plugins for this player

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
id Hash Player plugin ID
jsurl String Player plugin javascript URL
cssurl String Player plugin CSS URL
name String Player plugin name
description String Player plugin description
datecreated DateTime When the player plugin was created
datemodified DateTime When the player plugin was last modified
account

Account for this player plugin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
customer

Customer for this player plugin

The value of this field is an object containing the following fields:

Name Type Description
id Hash Customer ID
name String The name of this customer
datecreated DateTime When this customer was created
datemodified DateTime When this customer was last modified
settings

The settings for this player

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
key String Key of this player setting
type String Type of this player setting
stringvalue String If this is a ‘string’ setting, the string value of this setting
intvalue Integer If this is an ‘int’ setting, the int value of this setting
boolvalue Boolean If this is a ‘bool’ setting, the bool value of this setting

Errors

This action can return one of the default status codes, or one of the following status codes on error:

STATUS_PLAYER_SKIN_NOT_FOUND (460)
If the player skin specified by “skin” can not be found
STATUS_ITEM_NOT_FOUND (120)
If the item specified by “leaderitem” can not be found
STATUS_SHARE_PLAYER_NOT_FOUND (333)
If the player specified by “shareplayer” can not be found