Hello everyone,
I am trying to play a HTML5 Video using a MP4 file hosted in Amazon S3. I found a file called S3.php and this is the method that I am using
public static function getAuthenticatedURL($bucket, $uri, $lifetime, $hostBucket = false, $https = true)
{
$expires = time() + $lifetime;
$uri = str_replace(array('%2F', '%2B'), array('/', '+'), rawurlencode($uri)); // URI should be encoded (thanks Sean O'Dea)
return sprintf(($https ? 'https' : 'http').'://%s/%s?AWSAccessKeyId=%s&Expires=%u&Signature=%s',
// $hostBucket ? $bucket : $bucket.'.s3.amazonaws.com', $uri, self::$__accessKey, $expires,
$hostBucket ? $bucket : 's3.amazonaws.com/'.$bucket, $uri, self::$__accessKey, $expires,
urlencode(self::__getHash("GET\n\n\n{$expires}\n/{$bucket}/{$uri}")));
}
Then, in the HTML 5 Video, I will use the Authenticated URL and use it as the video source. It worked on Chrome, but in IE9 the video does not play.
Can you please give some examples or references on how to work on this.
thanks in advance.