Git Product home page Git Product logo

brightcove-playback-api-wrapper's Introduction

Brightcove Playback API Wrapper

This is a PHP wrapper for the Brightcove Playback API

Getting Started

Add files to project folder.

In get-brighcove-media.php replace the policy token and account number when the class is instantiated

To obtain policy key see this doc: http://docs.brightcove.com/en/video-cloud/brightcove-player/guides/policy-key.html or use the web app to get one directly from the Policy API: http://docs.brightcove.com/en/video-cloud/policy-api/getting-started/quick-start.html#Set_policy_app

File caching layer is activated by adding require_once('bc-papi-cache.php') to get-brightcove-media.php

Access api as follows (e.g. files placed in folder named brightcove-playback-api):

require_once($_SERVER['DOCUMENT_ROOT'] . '/brightcove-playback-api/get-brightcove-media.php');
//find video by video id
$videoid = 12345;
$video = $bc->find('find_video_by_id', 'videos', $videoid);
// e.g. get video poster and display
echo '<img src="' . $video->poster . '" />';

//find video by reference id
$refid = "ref:ref123";
$video = $bc->find('find_video_by_reference_id', 'videos', $refid);

//find playlist by playlist id
$playlistid = 54321;
$playlist = $bc->find('find_playlist_by_id', 'playlists', $playlistid);
echo '<img src="' . $playlist->videos[0]->poster . '" />';

//find playlist by reference id
$refid = "ref:ref321";
$playlist = $bc->find('find_playlist_by_reference_id', 'playlists', $refid);

Authors

Acknowledgments

brightcove-playback-api-wrapper's People

Contributors

hmhnewmant avatar jcaponi avatar rcrooks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.