How to embed private videos hosted on Amazon S3/Cloudfront using JW Player module? Have anyone tried using the signed url option provided by the new version of Amazon cloudfront with the JW Player module?
I´m using Drupal 7.

I´ve read that the idea of the signed url option is to generate the signed url at page load time with a short expiry. This way each user who loads the page gets a unique short lived URL they can access, if they share it, it will eventually expire limiting your exposure to hot-linking.

How may I add a dynamic expiring link? I know that this has more to do with how Amazon works than how JW Player works, but maybe someone can help me out because have made it through, or maybe have found a good n00b tutorial (I haven´t found any that explains how to use their services and this video player at once that I could actually understand).

Thanks in advance for any insight!
Rosamunda
Use this php function to get signed url

function getSignedURL($resource, $timeout)
{
//This comes from key pair you generated for cloudfront
$keyPairId = "YOUR_CLOUDFRONT_KEY_PAIR_ID";

$expires = time() + $timeout; //Time out in seconds
$json = '{"Statement":[{"Resource":"'.$resource.'","Condition":{"DateLessThan":{"AWS:EpochTime":'.$expires.'}}}]}';     

//Read Cloudfront Private Key Pair
$fp=fopen("private_key.pem","r"); 
$priv_key=fread($fp,8192); 
fclose($fp); 

//Create the private key
$key = openssl_get_privatekey($priv_key);
if(!$key)
{
    echo "&lt;p&gt;Failed to load private key!&lt;/p&gt;";
    return;
}

//Sign the policy with the private key
if(!openssl_sign($json, $signed_policy, $key, OPENSSL_ALGO_SHA1))
{
    echo '&lt;p&gt;Failed to sign policy: '.openssl_error_string().'&lt;/p&gt;';
    return;
}

//Create url safe signed policy
$base64_signed_policy = base64_encode($signed_policy);
$signature = str_replace(array('+','=','/'), array('-','_','~'), $base64_signed_policy);

//Construct the URL
$url = $resource.'?Expires='.$expires.'&amp;Signature='.$signature.'&amp;Key-Pair-Id='.$keyPairId;

return $url;
    }