Question

I want to play a remote video hosted in Brightcove. As Brightcove URLs are links to players not direct links to video files the AVPlayer won't do it. I know Brightcove provides an API but can't find any good examples for iOS nor documentation.

Any help/pointing direction appreciated.

Was it helpful?

Solution

I haven't used Brightcove, but poking around their site, I see they have two APIs: a Player API and a Media API. It sounds like the Media API is what you want — it's documented as giving direct references to the videos. The page has a link to several examples.

OTHER TIPS

You can also lift alot of the code from their Oneplanet demo source. In fact the whole playlist and video player mechanism can be practically copied into your project so all you need to do is pass a video or playlist ID into their initwithnibandplaylist function in their view controller and you're good to go.

I hope this helps your question. There is a renditions which contain direct video link. Here is a link for api link.

http://support.brightcove.com/en/video-cloud/docs/accessing-video-content-media-api

renditions is a javascript object containing multiple video links based on resolutions such as 360,460, 720.

You can find the direct link to the video via the media api, bypassing the player API entirely. You need a pro account and a token:

http://support.brightcove.com/en/docs/getting-started-media-api

Alternatively, you can create a simple "player" without any controls (just a video window actually) and make your own HTML controls totally outside of Brightcove to trigger almost anything you'd want to do via the player API.

There is also a Brightcove iOS SDK. It is really two SDKs one for the Media API and one that includes a MediaPlayer. If you want to use the AVPlayer you can use the Media API iOS SDK. Here is the docs for that:

http://docs.brightcove.com/en/video-cloud/mobile-sdks/brightcove-player-sdk-for-ios

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top