Media Callback

When dealing with New Spark Platform, there are situations where data could be modified on our servers and and you wish to be notified immediately.

There are four events within the platform that will trigger a call-back:

  • When a user rates a file
  • When a file is moderated (denied or approved)
  • When a file finishes being transcoded
  • When the system receives a callback from Brightcove (externalid)

One of the most common uses of this call-back is moderation. If your site is cached, and a file is denied, it will not be removed until your cache clears. Using the callback, you can take the appropriate action to immediately remove media that has been denied.

Configure the Media Callback URL

Locate the wrench icon in the top right-hand corner of the nav. Select "Project Settings" and once on this page, scroll down to the bottom field named Media Callback URL. This is where you will need to place the callback URL.

The payload

We will send over all the information about the file in an XML format, very similar to what is returned from the media.getFileInfo API method:

We only send out this information every 60 seconds. If there are multiple changes within this timespan, we will only give the the very latest information and we don't trigger the request for every individual change. We might change this 60-second timeframe to be either higher or lower depending on the usage patterns we're seeing.

Content-type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
  <date>2009-01-31 22:11:18</date>
  <title>Test 7 : single + empty</title>
  <upload>2009-01-31 22:11:18</upload>
  <converttime>2009-02-04 12:17:41</converttime>

As you can see we don't specifically mention what has been changed. We just give you the latest version of all the information.

The receiving end

The payload will be supplied as an HTTP POST request with an XML body. You should be prepared to accept this request. We require HTTP/1.1 with pipelining support for speed.


Be the first to comment on Media Callback.

Add a Comment

  • captcha