Hi,
The download button always downloads the (basic - small) flavor of the video....
How can I set it to download another flavor (I'd like the source flavor instead).
Unfortunately there is no easy way of doing this at the moment, as the download button just downloads whatever is currently being played (or defined in the flavorId flashvar).
You can't set the download button to a different url or flavor.
var mediaProxy :Object = facade.retrieveProxy("mediaProxy"); var entry:String=mediaProxy.vo.entry.id;
_flashvars= facade.retrieveProxy("configProxy")["vo"].flashvars; var cdnHost:String= _flashvars.cdnHost; var partner:String= _flashvars.partnerId; var subPartner:String= _flashvars.subpId; var flavor:String= _flashvars.flavorId; varurl:String; if(flavor !=null){ url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+flavor; } else { url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry } var request:URLRequest= newURLRequest(url); navigateToURL(request, "_blank");
to -
var mediaProxy :Object = facade.retrieveProxy("mediaProxy"); var entry:String=mediaProxy.vo.entry.id;
_flashvars= facade.retrieveProxy("configProxy")["vo"].flashvars; var cdnHost:String= _flashvars.cdnHost; var partner:String= _flashvars.partnerId; var subPartner:String= _flashvars.subpId; var flavor:String= _flashvars.flavorId; var downloadFlavorId:String= _flashvars.downloadFlavorId; varurl:String; if(downloadFlavorId != null){ url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+downloadFlavorId; }else{ if(flavor !=null){ url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+flavor; } else { url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry } } var request:URLRequest= newURLRequest(url); navigateToURL(request, "_blank");
Then go to your KMC, click the name of the video, go to the flavors tab, copy the "asset_id" of the flavor you'd like the download button to use, edit the embed code of your player and add the following to the player flashVars:
downloadFlavorId=[asset_id] (e.g. - downloadFlavorId=1_iweyrtwuie)
Hi,
Unfortunately there is no easy way of doing this at the moment, as the download button just downloads whatever is currently being played (or defined in the flavorId flashvar).
You can't set the download button to a different url or flavor.
If you are a flash person, there is an easy way to this, download the source for the download plugin:
http://www.kaltura.org/kalorg/kdp/trunk/plugins/downloadPlugin/
Then Edit the mediator file:
http://www.kaltura.org/kalorg/kdp/trunk/plugins/downloadPlugin/src/com/k...
In the handleNotification function, try to check for a new flashVar (e.g. downloadFlavorId) and then change the urls to use this.
e.g.
Change the following code to the code after.
var entry:String=mediaProxy.vo.entry.id;
_flashvars= facade.retrieveProxy("configProxy")["vo"].flashvars;
var cdnHost:String= _flashvars.cdnHost;
var partner:String= _flashvars.partnerId;
var subPartner:String= _flashvars.subpId;
var flavor:String= _flashvars.flavorId;
var url:String;
if (flavor !=null){
url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+flavor;
}
else
{
url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry
}
var request:URLRequest= new URLRequest(url);
navigateToURL(request, "_blank");
to -
var entry:String=mediaProxy.vo.entry.id;
_flashvars= facade.retrieveProxy("configProxy")["vo"].flashvars;
var cdnHost:String= _flashvars.cdnHost;
var partner:String= _flashvars.partnerId;
var subPartner:String= _flashvars.subpId;
var flavor:String= _flashvars.flavorId;
var downloadFlavorId:String= _flashvars.downloadFlavorId;
var url:String;
if (downloadFlavorId != null) {
url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+downloadFlavorId;
} else {
if (flavor !=null){
url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry+"/flavor/"+flavor;
}
else
{
url="http://"+cdnHost+"/p/"+partner+"/sp/"+subPartner+"/download/entry_id/"+entry
}
}
var request:URLRequest= new URLRequest(url);
navigateToURL(request, "_blank");
Then go to your KMC, click the name of the video, go to the flavors tab, copy the "asset_id" of the flavor you'd like the download button to use, edit the embed code of your player and add the following to the player flashVars:
downloadFlavorId=[asset_id] (e.g. - downloadFlavorId=1_iweyrtwuie)