Hi @Petrosyan,
Looking at the request triggered by clicking on the “DOWNLOAD THIS VIDEO” <a>
, it is the same in both test and prod:
<div class="field-item-ga-video"><a class="no-external-link-msg GoogleAnalyticsET-processed" href="/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike Ethridge | Inside Storytelling.mp4" download="download">Download</a>
</div>
If you try:
$ curl -v -L "https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4" >/tmp/file.mp4
You will see the file is indeed downloaded correctly so the issue here is not on the Kaltura side of things.
When making the request against your Prod site, one gets HTTP 500 from your Apache:
$ curl "https://www.knowitall.org/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4" -v
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Thu, 17 May 2018 13:35:55 GMT
< Server: Apache
Whereas, the request against the test instance:
$ curl -v -I "https://test-knowitall.pantheonsite.io/kaltura_download?file_path=https://www.kaltura.com/p/954571/sp/0/playManifest/entryId/1_tdykt4e4/format/url/flavorParamId/487081/Mike%20Ethridge%20|%20Inside%20Storytelling.mp4"
Goes to an Nginx server and seems to pass through Varnish:
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Server: nginx
Server: nginx
< Via: 1.1 varnish
Via: 1.1 varnish
I’d start by checking the Apache error logs on your Prod server and also the code /kaltura_download points to on each.
Regardless, just to make sure you are aware of this, the Kaltura player has a download plugin which you can enable via KMC->Studio which will render a download button on the player itself thus saving you from having to implement this function on your own.
Additionally, there is a Kaltura API action called flavorasset->getUrl() that you can also use, rather than build the URL yourself and pass it as a GET param to /kaltura_download as you are doing now.
See https://developer.kaltura.com/api-docs/Convert_and_Transcode_Media/flavorAsset/flavorAsset_getUrl/
For the entry in question, this will return:
http://cfvod.kaltura.com/pd/p/954571/sp/95457100/serveFlavor/entryId/1_tdykt4e4/v/1/flavorId/1_56bm7wcv/fileName/(SD_Small-WEB_MBL(H264_900)).mp4/name/a.mp4