使用azure blob类型存储v2上传视频并且视频播放良好。但它不允许我们快进或快退视频。
原因是Azure默认不支持字节范围请求。
这里有如何启用它的说明:
https://programmerpayback.com/2013/01/30/hosting-progressive-download-videos-on-azure-blobs/
命令如下。
$ctx = New-AzureStorageContext -StorageAccountName <account-name> -StorageAccountKey <key>
Get-AzStorageServiceProperty -Context $ctx -ServiceType Blob
;这将为您提供有关 DefaultServiceVersion
的信息。如果为空,则可能默认为 2009-09-19Update-AzStorageServiceProperty -Context $ctx -ServiceType Blob -DefaultServiceVersion 2024-02-04
在此处获取所有版本的列表:https://learn.microsoft.com/en-us/rest/api/storageservices/previous-azure-storage-service-versions
现在向您的 blob 存储发出不带版本号的请求应该会为您提供正确的标头。