Saving Kshow

4 replies [Last post]
Joined: 03/29/2009
Points: 755

Saving Kshow

Joined: 03/29/2009
Points: 755

Hi,

I am new to using Kaltura so this could be pretty obvious, but it's been giving me some problems. I am having issues saving my remixes. Everything works up until the point when I click save. Here is an image of the error message:

"Internal Server Error. Did not match required privileges [edit:(long number)]"

Picture 1.png

It seems as if it is trying to save under a new entryID or something? I printed the initial entryID and it is different from the similarly-sized number. Or perhaps I need to change my account's settings? I'm hoping that it's a pretty simple fix.
Ultimately, I would like to save the entryID to the mysql database for my site so users can recall the remix using the dynamic player.

Thanks in advance for any help you have to offer!
clewis

Here's the code:

Code: Select all
<?php
require_once("kaltura_client.php");

define(KALTURA_PARTNER_ID, *****);
define(KALTURA_SUBP_ID, *****00);
define(KALTURA_SECRET, "***************");

$config = new KalturaConfiguration(KALTURA_PARTNER_ID,KALTURA_SUBP_ID);

$user = new KalturaSessionUser();
$user->userId = "CLEWIS";
$user->screenName = "clewis";

$client = new KalturaClient($config);
$result = $client->startSession($user, KALTURA_SECRET, false);
$ks = $result["result"]["ks"];

$client->setKS($ks);
$entry = new KalturaEntry();
$entry->name = "My First Mix";
$res = $client->addRoughcutEntry($user, -2, $entry);
$entryId = @$res["result"]["entry"]["id"];

$flashVars = array();
$flashVars["partnerId"] = KALTURA_PARTNER_ID;
$flashVars["subpId"] = KALTURA_SUBP_ID;
$flashVars["uid"] = $user->userId;
$flashVars["ks"] = $ks;
$flashVars["kshowId"] = "entry-".$entryId;
$flashVars["entryId"] = $entryId;
$flashVars["backF"] = "onSimpleEditorBackClick";
$flashVars["saveF"] = "onSimpleEditorSaveClick";

print $entryId;
?>

Media Contribution Test

var params = {
allowScriptAccess: "always",
allowNetworking: "all",
wmode: "opaque"
};

var flashVars = <?php echo json_encode($flashVars); ?>;
swfobject.embedSWF("http://www.kaltura.com/kse/ui_conf_id/36300", "kse", "890", "546", "9.0.0", false, flashVars, params);

function onSimpleEditorBackClick(isModified) {
alert('onSimpleEditorBackClick');
}

function onSimpleEditorSaveClick() {
alert('onSimpleEditorSaveClick');
}

Joined: 03/29/2009
Points: 755

You need to add a KShow before you can add a roughcut.

Code: Select all
addKShow($kalturaSessionUser, $kshow, $detailed = null, $allowDuplicateNames = null)

Joined: 03/29/2009
Points: 755

How and Where do you add the create Kshow code? Thanks

Joined: 03/29/2009
Points: 755

You create the KShow before you create the rough cut. You can use the addKShow function as documented in the Developers Wiki.

I believe Kaltura are planning to abandon the whole concept of KShow's in the future, just to make life easier.