4

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.

Janusz
  • 187,060
  • 113
  • 301
  • 369
Martha
  • 1,070
  • 1
  • 12
  • 29
  • Ty Chuck :) Brightcove is a professional video delivery platform: http://www.brightcove.com. They dont publish video file URLs but links to players to emb. That's why you need to use the API. – Martha Oct 26 '11 at 13:37
  • @Martha could you please help me out in implementing brightcove into ios – Burhanuddin Sunelwala Jun 05 '13 at 08:29

5 Answers5

2

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.

Chuck
  • 234,037
  • 30
  • 302
  • 389
  • I've managed to make it work using BC's API. If anyone interested just drop me a msg and I'll post a quick example. Ty Chuck! – Martha Oct 28 '11 at 12:45
  • Just as a comment to anyone about to use BC: bc API library comes hardlinked with some open source REST library for iphone. If you happen to use the same library or worst same lib but newer version you will get some ugly errors. Thats why I switched for fliqz video hosting. The have just a REST API that brings you the real video's URL to play with the usual AVPlayer that we all know and love. Hope this comes usefull for anyone. – Martha Nov 15 '11 at 17:30
  • Hi Chcuk... can you please tell me how to restrict the you tube video playing with in a webview... here, i do not want to play the video in full view... But when i want to play the video we have to click on the webview then instantly it is showing full screen with video playing.. But, i want to play with in the web view only.... please guide me @Chuck – Babul Nov 16 '13 at 09:26
  • @Chuck URL you specified is not exist. – Nagarjun Jan 23 '17 at 12:44
1

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.

Kyung Hwan Min
  • 357
  • 3
  • 5
1

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.

neilh
  • 11
  • 1
0

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.

0

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

Ric Santos
  • 15,419
  • 6
  • 50
  • 75