So far i have tried below:
...
public function upload()
{
$jwplatform_api = new Jwplayer\JwplatformAPI('my_key', 'my_secret');
$target_file = 'upload/vids/course/bede6b9c266b876fc2f0dea7a86cf8bd.mp4';
$params = array();
$params['title'] = 'PHP API Test Upload';
$params['description'] = 'Video description here';
// Create video metadata
$create_response = json_encode($jwplatform_api->call('/videos/create', $params));
$decoded = json_decode(trim($create_response), TRUE);
$upload_link = $decoded['link'];
$upload_response = $jwplatform_api->upload($upload_link, $target_file);
print_r($upload_response);
}
...
But no luck, it says "Class 'Jwplayer\JwplatformAPI' not found". And yeah, i have put the files I got from https://github.com/jwplayer/jwplatform-php in the ROOT position inside a folder named "jwplatform-php".