If you try to upload a new video from a node, you will get an error that says "Class 0oyalaPartnerApi" does not exist on line 221 of ooyala.pages.inc.
$ooyala = new OoyalaPartnerAPI($secret, $pcode);
I believe the function ooyala_upload_js is missing the function module_load_include('inc', 'ooyala', 'includes/ooyala.api');
Here's what I added:
function ooyala_upload_js($thisfield) {
// TODO: We need a way here to enforce permissions. Right now the menu
// callback is accesible to those who can 'access content'. What we need here
// is to be able to identify which field is being validated and check for edit
// permissions on it, as defined by content_permissions.module
// The javascript from the form sends us the name of the field we are
// validating in arg(2) in order to get the secret and pcode for the signature
// from the widget settings.
module_load_include('inc', 'ooyala', 'includes/ooyala.api');
$fieldinfo = module_invoke('content', 'fields', $thisfield);
$secret = variable_get('ooyala_global_secret', '');
$pcode = variable_get('ooyala_global_pcode', '');
$ooyala = new OoyalaPartnerAPI($secret, $pcode);
Comments
Comment #1
quicksketchThanks, we recently moved the API functions into a separate file and looks like we missed this include call. I've added it to ooyala_upload_js() as you've suggested.