无法使用 Azure blob 快进和快退视频

问题描述 投票:0回答:2

使用azure blob类型存储v2上传视频并且视频播放良好。但它不允许我们快进或快退视频。

azure
2个回答
1
投票

原因是Azure默认不支持字节范围请求。

这里有如何启用它的说明:

https://programmerpayback.com/2013/01/30/hosting-progressive-download-videos-on-azure-blobs/


0
投票

命令如下。

  1. 安装 Azure Powershell https://learn.microsoft.com/en-us/powershell/azure/install-azps-windows
  2. $ctx = New-AzureStorageContext -StorageAccountName <account-name> -StorageAccountKey <key>
  3. Get-AzStorageServiceProperty -Context $ctx -ServiceType Blob
    ;这将为您提供有关
    DefaultServiceVersion
    的信息。如果为空,则可能默认为 2009-09-19
  4. Update-AzStorageServiceProperty -Context $ctx -ServiceType Blob -DefaultServiceVersion 2024-02-04

在此处获取所有版本的列表:https://learn.microsoft.com/en-us/rest/api/storageservices/previous-azure-storage-service-versions

现在向您的 blob 存储发出不带版本号的请求应该会为您提供正确的标头。

旧: enter image description here

新: enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.