The Brightcove Media API is a Cocoa/Objective-C Library for employing the JSON based Brightcove Media API The media API provides a Cocoa/Objective-C interface for the Brightcove video and playlist API's.
The Brightcove Media API provides a set of JSON services to access Brightcove content through custom application development. It is documented on the Brightcove site:
http://docs.brightcove.com/en/media/
Use of the Brightcove Media API requires a developer readToken granted by Brightcove support. No invocations in this library will succeed without a valid readToken.
The BCMediaAPI class is a facade for all Brightcove Media API calls. This enables developers to instantiate it once and reuse it for all invocations:
BCMediaAPI *bc = [[BCMediaAPI alloc] initWithReadToken:@"MyReadToken"];
Invocations employ Cocoa-style error pointers, thus the pattern for all invocations is similar to the following:
NSError *err; BCVideo *video = [bc findVideoById:1234 error:&err]; if (!video) { // if the result is nil, and we sent the optional error argument, // then the error will be populated by all underlying errors reported // by the Brightcove server. We can use this convenience method to dump // the NSError's userInfo, where the underlying errors are reported, to // an NSString for logging or other purposes: NSString *errStr = [bc getErrorsAsString:err]; NSLog(errStr); }
For supported methods, view the BCMediaAPI class documentation or header file.