diff --git a/functions.php b/functions.php index bb6c297..b2d669c 100755 --- a/functions.php +++ b/functions.php @@ -294,7 +294,7 @@ use Obs\ObsClient; /* obs get video */ function getVideo($path, $time = 120*60){ - return obsSign($path, $time); + return obsSign($path, $time, 'yimian-video'); } @@ -307,7 +307,7 @@ function getImg($path, $time = 300){ -function obsSign($path, $expires = 300){ +function obsSign($path, $expires = 300, $bucket = 'yimian-image'){ $obsClient = new ObsClient([ 'key' => $GLOBALS['huawei_AK'], @@ -318,7 +318,7 @@ function obsSign($path, $expires = 300){ $resp = $obsClient->createSignedUrl( [ 'Method' => 'GET', - 'Bucket' => 'yimian-image', + 'Bucket' => $bucket, 'Key' => $path, 'Expires' => $expires ] ); diff --git a/index.php b/index.php index 0e04a12..274cd5b 100644 --- a/index.php +++ b/index.php @@ -6,7 +6,7 @@ header('Access-Control-Allow-Origin:*'); -header('content-type: video/mp4'); +//header('content-type: video/mp4'); $path = $_REQUEST['path'];