jwplayer / jwplatform
Official JW Player client
Installs: 260 834
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 32
Forks: 17
Open Issues: 8
Requires
- php: >=5.6.0
- ext-curl: *
This package is not auto-updated.
Last update: 2025-02-26 10:46:53 UTC
README
The JWPlatform PHP library provides convenient access to the JW Platform Management API from applications written in the PHP language.
Visit JW Player Developer site for more information about JW Platform API.
Requirements
PHP 5.6.0 and later.
Install
Composer
You can install the bindings via Composer. Run the following command:
composer require jwplayer/jwplatform
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Manual Installation
If you do not wish to use Composer, you can download the
latest release.
Then, to use the bindings, include the init.php
file.
require_once('/path/to/jwplatform-php/init.php');
Dependencies
The bindings require the following extensions in order to work properly:
curl
, although you can use your own non-cURL client if you prefer
If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.
Usage
Please refer to our documentation for all API functionality.
Client setup
$jwplatform_api = new Jwplayer\JwplatformClient('INSERT API SECRET');
Get video metadata
$media_id = 'INSERT MEDIA ID'; $site_id = 'INSERT SITE ID'; $response = $jwplatform_api->Media->get($site_id, $media_id);
V1 Client
The V1 Client remains available for use but is deprecated. We strongly recommend using the V2 Client when possible.
$jwplatform_api = new Jwplayer\v1\JwplatformAPI('INSERT API KEY', 'INSERT API SECRET');
Development
Get Composer. For example, on Mac OS:
brew install composer
Install dependencies:
composer install
License
JW Platform API library is distributed under the MIT license.