Live Media Feed APIs

 

LiveMediaFeed Entity

The LiveMediaFeed entity has the following properties:

  • Id int:(read only) The identifier and primary key of the LiveMediaFeed instance.

  • Name string: The user-defined name of the LiveMediaFeed instance. This alternate key must be unique in the scope of the BrightSign Network account.

  • TTL TimeSpan: The amount of time that the Live Media Feed can be cached on the client (i.e. player) before it is refreshed from the source. Note that the caching behavior of the media files themselves is determined by settings on the player.

  • PhysicalPath string:(read only) The external URL of the associated MRSS file in the persistent storage.

  • FileSize long:(read only) The size of the associated MRSS file (in bytes).

  • FileHash string:(read only) A SHA1 hash of the associated MRSS file contents.

  • CreationDate DateTime:(read only) A UTC timestamp indicating when the Live Media Feed was created in the BrightSign Network.

  • Contents LiveMediaFeedContent[]: An array of LiveMediaFeedContent entity-relations that reference content instances contained within the Live Media Feed. This list is set to Null when not initialized by the server.

LiveMediaFeedContent Entity-Relation

The LiveMediaFeedContent entity-relation represents associations between a Content instance and a LiveMediaFeed instance. It has the following properties:

  • ContentId int: The identifier and primary key of the associated Content instance. This value can be set by either the client or the server.

  • FileName string: The virtual name of the file represented by the current Content instance.

  • Title string: The key (i.e. MRSS item title) of the associated media item in the related Live Media Feed.

  • Description string: The value (i.e. MRSS item description) of the associated media item in the related Live Media Feed.

  • DisplayDuration TimeSpan: The amount of time the player will display the associated image file. This property does not apply to audio or video files.

  • ValidityStartDate DateTime: A value that determines the validity start date for the associated content item (i.e. the point at which the content item will be start being displayed in the Live Media Feed). A Null value determines that the content item is valid from the moment it is added to the Live Media Feed; this is the standard case for most content items.

  • ValidityEndDate DateTime: A value that determines the validity end date for the associated content item (i.e. the point at which the content item will no longer be displayed in the Live Media Feed). A Null value determines that the content item will be valid until it is removed from the Live Media Feed manually by the user; this is the standard case for most content items.

  • CustomFields Dictionary<string, string>: A dictionary of key and value pairs. Each pair represents a custom field associated with the media item in the MRSS file of the related Live Media Feed.

Live Media Feed Management Web Methods

PagedList<LiveMediaFeed> GetLiveMediaFeeds(string marker, int pageSize)

Retrieves the next page of the LiveMediaFeed list, sorted by Name string. The returned list will contain no more items than the defined page size.

Permissions

Live Media Feed: View Live Media Feeds

Parameters
  • marker string: The Name string of the last LiveMediaFeed instance on the previous page. If the value is Null, then the method will retrieve the first page.

  • PageSize int: The maximum number of objects returned by the method. If the list of objects that match the search criteria exceeds the pageSize int limit, the returned list will indicate that it is truncated. If the integer is not positive, then the method will return the maximum allowed number of objects. Attempting to request more objects than is allowed will lead to the same result, but without an error.

List<LiveMediaFeed> GetSpecifiedLiveMediaFeeds(int[] liveMediaFeedIds)

Retrieves a list of LiveMediaFeed instances matching the specified identifiers, sorted by Name string. The identifiers of nonexistent LiveMediaFeed instances will be ignored.

Required Permissions

Live Media Feed: View Live Media Feeds

Parameters
  • liveMediaFeedIds int[]: An array of Id int values for the LiveMediaFeed instances being requested. The number of returned items is limited to 100 by the server. Attempting to request more than the maximum allowed number of objects will cause an error, while passing an empty array will lead to an immediate empty response without an error.

PagedList<LiveMediaFeed> FindLiveMediaFeeds(string namePattern, string marker, int pageSize)

Retrieves the next page of a LiveMediaFeed list containing names matched with the specified pattern. The returned list is organized by Name string and may not contain more items than the defined page size.

Required Permissions

Live Media Feed: View Live Media Feeds

Parameters
  • namePattern string: The exact Name string of the LiveMediaFeed instance (or its wildcard-based pattern). Supported wildcards currently include “*”, “?”, and “[‘and’]”.

  • marker string: The Name string of the last LiveMediaFeed instance on the previous page. If the value is Null, then the method will retrieve the first page.

  • pageSize int: The maximum number of objects returned by the method. If the list of objects that match the search criteria exceeds the pageSize int limit, the returned list will indicate that it is truncated. If the integer is not positive, then the method will return the maximum allowed number of objects. Attempting to request more objects than is allowed will lead to the same result, but without an error.

LiveMediaFeed GetLiveMediaFeed(int liveMediaFeedId, bool loadContent)

Retrieves a single LiveMediaFeed instance with the specified Id int. This method returns Null if the LiveMediaFeed instance with the specified identifier does not exist.

Required Permissions

Live Media Feed: View Live Media Feeds

Parameters
  • liveMediaFeedId int: The identifier and primary key of the LiveMediaFeed instance to be retrieved.

  • loadAssets bool: A flag specifying whether the method should also initialize and return a list of all content files currently being used by the Live Media Feed.

LiveMediaFeed GetLiveMediaFeedByName(string name, bool loadContent)

Retrieves the LiveMediaFeed instance with the specified [string] Name. This method returns Null if the LiveMediaFeed instance with the specified name does not exist.

Required Permissions

Live Media Feed: Live Media Feeds

Parameters
  • name string: The user-defined Name of the LiveMediaFeeds instance to be retrieved. The length of the string is limited to 50 characters.

  • loadAssets bool: A flag specifying whether the method should also initialize and return a list of all content items currently being used by the Live Media Feed.

bool CheckLiveMediaFeedName(string name)

Determines whether the specified Name string is currently being used by a Live Media Feed. This method returns True if a Live Media Feed with the specified Name currently exists.

Note that when using this method to check whether a Live Media Feed can be created, a False status may change after this method is called.

Required Permissions

None

Parameters
  • name string: The Live Media Feed Name string value to be evaluated.

LiveMediaFeed CreateLiveMediaFeed(LiveMediaFeed entity)

Creates a new LiveMediaFeed instance (as well as the related MRSS file) with the specified Name string, TTL TimeSpan, and Contents LiveMediaFeedContent[] parameters. If successful, this method returns the created instance with all initialized properties. If an error occurs during the creation process, this method will return Null.

Permissions

Live Media Feed: Create Live Media Feed

Parameters
  • entity LiveMediaFeed: A LiveMediaFeed object instance with initialized Name string and Contents LiveMediaFeedContent[] parameters. All other properties will be ignored during object creation. If one of these parameters is set to Null, then the method will immediately return Null without an error. The server will return a descriptive error if any of the following conditions occur:

    • The length of the specified Name string exceeds 50 characters.

    • The specified Name string is already being used by another LiveMediaFeed instance.

    • The specified TTL TimeSpan is less than 1 minute or more than 24 hours.

    • The number of LiveMediaFeedContent items in the object instance surpasses the limit defined on the server.

    • The Title string of one or more LiveMediaFeedContent items is empty or longer than 50 characters.

    • The DisplayDuration TimeSpan of one or more LiveMediaFeedContent items is less than 1 second or greater than 24 hours.

    • There are more than 20 unique custom fields for all LiveMediaFeedContent items in the Live Media Feed.

    • One or more custom field names are empty or longer than 50 characters.

    • One or more custom field names contain a string that is reserved for the MRSS feed: "title", "description", "link", "description", "link", "category", "guid", "item", "content".

bool UpdateLiveMediaFeed(LiveMediaFeed entity)

Updates the Name string and content parameters of the specified LiveMediaFeed instance (as well as the related MRSS file). This method returns True only if completely successful. Otherwise, it returns False.

Permissions

Live Media Feed: Updated Live Media Feed

Parameters
  • entity LiveMediaFeed: A LiveMediaFeed instance with the Id int of the existing instance to be updated, as well as new Name string and Contents LiveMediaFeedContent[] parameters for the instance. If this parameter is Null or invalid, the method will immediately return Null without an error. The server will return a descriptive error if one or more of the following conditions occur:

    • The Id int does not correspond to an existing LiveMediaFeed instance.

    • The length of the new Name string exceeds 50 characters.

    • The new Name string is currently in use by another LiveMediaFeed instance.

    • The new TTL TimeSpan is less than 1 minute or greater than 24 hours.

    • The number of LiveMediaFeedContent items in the object instance surpasses the limit defined on the server.

    • The Title string of one or more LiveMediaFeedContent items is empty or longer than 50 characters.

    • The DisplayDuration TimeSpan of one or more LiveMediaFeedContent items is less than 1 second or greater than 24 hours.

    • There are more than 20 unique custom fields for all LiveMediaFeedContent items in the Live Media Feed.

    • One or more custom field names are empty or longer than 50 characters.

    • One or more custom field names contain a string that is reserved for the MRSS feed: "title", "description", "link", "description", "link", "category", "guid", "item", "content".

bool RenameLiveMediaFeed(int liveMediaFeedId, string newName)

Updates the Name string of the specified LiveMediaFeed instance. This method returns True upon success and False upon failure.

Permissions

Live Media Feed: Update Live Media Feed, Rename Live Media Feed

Parameters
  • liveMediaFeedId int: The identifier and primary key of the LiveMediaFeed instance to be renamed. If there are no LiveMediaFeed instances with the specified identifier, the server will return False without an error.

  • newName string: The new Name string for the specified LiveMediaFeed instance. The server will return a descriptive error if the name is more than 50 characters or if another LiveMediaFeed instance has the same name.

bool DeleteLiveMediaFeeds(int[] liveMediaFeedIds)

Deletes the specified LiveMediaFeed instance(s), as well as the related MRSS file(s), from both the database and persistent storage. This method returns True only if completely successful. Otherwise, it returns False.

Permissions

Live Media Feed: Update Live Media Feed

Parameters
  • liveMediaFeedIds int[]: An array of Id int values indicating LiveMediaFeed instances that should be deleted. The number of requested instances is limited to 100 by the server. The server will return an error if one or more of the following conditions occur:

    • More than the maximum allowed number of objects are requested.

    • An Id int parameter does not correspond to an existing LiveMediaFeed instance.

    • An empty array is passed to the server.

ON THIS PAGE