iOS 10 AVPlayer will not stream video from URL with no extension and with video/mp4 as content type

前端 未结 2 1672
走了就别回头了
走了就别回头了 2021-01-13 03:37

Currently, we are using a standard AVPlayer via AVPlayerViewController to play video. We are streaming video from a url in the format https://ourdo

2条回答
  •  滥情空心
    2021-01-13 04:11

    AVURLAsset is require a file extension to work. unfortunately there are already some radars open for the same issue from iOS 5 but it seems even it is not updated on iOS 10.

    Radar links:

    AVURLAsset should not require a file extension to work

    AVURLAsset should not require a file extension to work

    WorkAround / Hack:

    Cycle through the playable MIME types and create a symbolic links to the actual file with the extension and check if they are playable.

    Note:

    • Symbolic Link will be deleted when the app entered into background
    • To Create symbolic link check this SO answers

提交回复
热议问题