Media API

Why does find_all_videos only return 100 records using the Media API?
EDITION: Enterprise, Express 499, Pro / CATEGORY: Media API / PRODUCT: Video Cloud
The reason why find_all_videos only returns 100 records using the Media API is because there is a built-in default page size of 100 for the find_all_videos method.

In order to return all of the records, you need to use the page_number parameter to return the next set of 100, and so on.

The method and all its parameters are listed on our online help center, in the Media API documentation.
What event is fired when a video is played?
EDITION: Enterprise, Express 499, Pro / CATEGORY: Media API / PRODUCT: Video Cloud
The event fired when a Video begins is "mediaBegin" (constant in Player API SWC is MediaEvent.BEGIN, constant in JavaScript API is BCMediaEvent.BEGIN),

This is dispatched when the media begins playing the first time, post buffer. This is the equivalent to the old "streamStart" and should be used for any tracking purposes. It will only be dispatched once for a media object, so not on replay (unless the media is loaded a second time after another piece of media is played in between).

A stream means the start of the delivery of a media file as initiated by an end user or by an auto play feature of a Brightcove player where the transfer of the media file is through streaming delivery, progressive download delivery or any other format supported by Brightcove. A stream can be all or a fraction of a single media file and there may be multiple Streams in an end user's session. If the same media file, or portion thereof, is re-viewed by and end user in a single session or in a multiple session, each view counts as a separate stream. Bumpers and ads do not count as streams.
How can I download videos using the Media API?
EDITION: Enterprise, Express 499, Pro / CATEGORY: Media API / PRODUCT: Video Cloud
To obtain the FLV urls of your Videos, you will need to use our Universal Delivery Service and the Media APIs. To do this, you need:

1. An account that is enabled for universal delivery service. You can read more about this here.

2. A Media API token that enables URL access to your media

Once you have set up your account for universal delivery service and enabled delivery of media by HTTP, you can use the Media API to deliver videos by HTTP. To do this, use the Media API read methods with the optional media_delivery=http argument. For example:

http://api.brightcove.com/services/library?command=find_all_videos&token=[INSERT YOUR TOKEN HERE]&media_delivery=http&output=mrss

You can also download videos directly via the Video Cloud Media Module. Please see this page for further instruction.



How can I get confirmation that a video has been updated?
EDITION: Enterprise, Express 499, Pro / CATEGORY: Media API / PRODUCT: Video Cloud
You can use the Media APIs to do this. This gets all the videos that have been modified since the given time. The call you would use is:

Get the id of all videos that have been modified or deleted since March 3rd, 2003.

http://api.brightcove.com/services/library?command=find_modified_videos&from_date=17444520&filter=PLAYABLE,DELETED&video_fields=id&token=[token]

The date, specified in minutes since January 1st, 1970 00:00:00 GMT, of the oldest Video which you would like returned. The format returned is JSON but if you wish it to be RSS, simply add in output=rss like this:

http://api.brightcove.com/services/library?command=find_modified_videos&output=rss&from_date=17444520&filter=PLAYABLE,DELETED&video_fields=id&token=[token]

You can see more examples of the Media APIs here:

http://docs.brightcove.com/en/media/#Video_Read

If you press the + next to each, it expands with details and examples.