brightcove / PHP-API-Wrapper

This project provides a starting point for integrating the Brightcove CMS API into your application. It provides simple ways to interact with the API, as well as a long list of helper functions.
25 stars 33 forks source link

How to get FLV URL with the new API? #28

Closed F3L1X79 closed 7 years ago

F3L1X79 commented 7 years ago

With the old API, it was possible to get the FLV URL like:

$bc = new BCMAPI(
            'xxx', 'xxx'
        );
        $searchParams = array(
            'video_id' => $id,
            'media_delivery' => 'HTTP',
            'video_fields' => 'FLVURL'
        );
        $cbf = $bc->find('videobyid', $searchParams);
        $flvurl = $cbf->{'FLVURL'};

With the new API I tried:

                    $CLIENT_ID = 'xxx';
                    $CLIENT_SECRET = 'xxx';
                    $ACCOUNT = 'xxx';

                        $CLIENT = \Brightcove\API\Client::authorize($CLIENT_ID, $CLIENT_SECRET);
                        $CMS = new \Brightcove\API\CMS($CLIENT, $ACCOUNT);

                        $cms_video = $CMS->getVideo($id);
                        var_dump($cms_video->link);

But the link attribute is always NULL. Any help is greatly appreciated.

janmashat commented 7 years ago

The new API doesn't support FLVURL as per https://support.brightcove.com/migrating-legacy-apis-catalog-apis

F3L1X79 commented 7 years ago

Any workaround, or any way to retrieve this information somewhere?

janmashat commented 7 years ago

You can retrieve the information through the Media API, while it's still available:

On December 31, 2017, the “read” methods of the Media API will be fully retired. https://support.brightcove.com/changes-video-cloud-service

F3L1X79 commented 7 years ago

Pff, thank you... I know you are not the one to blame, trying to help me - but Brightcove API is a real pain, seriously. See you at the new year '18 then.