Copyright © 2011 Kaltura Inc.
All Rights Reserved. Designated trademarks and brands are the property of their respective owners.
Use of this web site constitutes acceptance of the Terms of Use and Privacy Policy.
EduVideo.org
Hi all
We're building a custom widget using the code from the simple editor.
As part of this we are including a module that will allow us to upload a file to the server, which we will then add to the timeline. The module will be built using api v3.
I'm trying to work out the workflow of an upload. So far i have
1. upload file
media service - upload(fileData)
returns xml containing a filetoken
2. add the entry details and the entry to the server
addfromuploadedfile(KalturaMediaEntry kme, String filetoken)
kme contains details like file name tags etc..
returns xml containing the entryId
Have I missed anything?
I'll post back our experience here as we move along.
I'm working with Cormac on this, getting some unexpected behaviour, the media.upload API3 service is returning the html code for the server front page. Any suggestions?
Update: Solved
public var partnerservices2URL : String = "/index.php/partnerservices2/";
public var partnerservices3URL : String = "/api_v3/";
Unlike the api_v2 urls I had to drop the "/index.php"
We're defining the api-3 services calls in the service locator.
api-2 services are defined like this:
for the api-3 you should define it like so.
<mx:HTTPService id="addfromuploadedfile" url="{domain}{partnerservices3URL}"
method="GET" resultFormat="e4x" >
Ensure that the method type is GET not POSTand define the service method as a param that gets passed to the service
etc
Can one of the core team confirm this information :)
You already have a complete client library for Flex that provide encapsulated implementation of all the Kaltura API in Flex (upload being one of them, but you really should prefer using the KUpload widget for upload, that way you get a more complete upload mechanism).
This is the start of what I'm working on to make clients and client-server flow more visible and easy to understand -
http://www.kaltura.org/kaltura-api-and-testme-console-introduction (based on the contribution of the valuable member Chris Hocking).
http://www.kaltura.org/kaltura-api-client-libraries-guide .
Thanks for the help
Is there any chance you could post a very quick example of how to make a call using the flex client.
So far I'm
1. creating a KalturaConfig object and setting some parameters
2. creating a KalturaClient object using the config object
then i'm getting a bit stuck, I've tried creating a KalturaCall object and passing that to the post method in KalturaClient like so
but nothing happens
any help would be greatly appreciated
Maybe a very simple Flex project that implemented the kcl_Flex is what's needed.
Your using the KalturaCall class directly which is incorrect, KalturaCall is the parent class for the service commands
try this
kca.addEventListener(KalturaEvent.COMPLETE, onComplete_kca);
kca.addEventListener(KalturaEvent.FAILED, onFailed_kca);
kca.execute();
It might be helpful if the KalturaCall throw an error from its execute method, as currently if fails silently
ok so i have a few flex api v3 calls up and running now,
AddFromUploadedFile, MixingGet :)
I've run into a problem when calling the MixingUpdate command
I call in the same way as i do the others
var mu:MixingUpdate = new MixingUpdate(_model.kMixEntry.id, kme);
mu.config = _model.kConfig;
/*
add this as a listener for events fired by the MixingUpdate command
*/
mu.addEventListener(KalturaEvent.COMPLETE, onComplete_mu);
mu.addEventListener(KalturaEvent.FAILED, onFailed_mu);
/*
fire the command
*/
mu.execute();
the call is failing however with the following error message
The property "KalturaMixEntry::hasRealThumbnail" cannot be updated
Initially when updating i was trying to send the full KalturaMixEntry I had stored in the model but I was getting a "partnerId cannot be updated" message
So I created a blank KalturaMixEntry to send to the server with the name field changed to test it
so... the question is how do i stop this hasRealThumbnail property from getting sent?
ps: is this field deprecated? by removing it from the KalturaMixEntry value object , the MixingUpdate call works
What api-3 service call relates to the api-2 service call loadEntryMultirequest, from the simple editor LoadEntryMRCommand, is it baseEntry:get or mixing:get
loadEntryMultirequest is an internal command within the CVF that the KSE uses.
The loadEntryMultirequest command calls getEntry, getKshow (deprecated in api_v3) and a getEntries (that retrieve a list of entries inside the Mix) using a single API callback: multirequest that enable creating a sequential series of API calls wrapped in a single API call.
Follow the client library project page - we will soon update with some documents and samples.
Sounds exciting! Seems to me you have the right flow.