我用 shaka 打包器创建了 HLS 清单和碎片化的 mp4 段。清单在 ios 和 web Safari 浏览器中可以正常播放。但是,当馈送到 AVPlayer 时,它只播放视频而不播放音频。
mediastreamvalidator 工具已验证流并且未显示任何错误。
hls_manifest.m3u8
#EXTM3U
## Generated with https://github.com/google/shaka-packager version 2d025da-release
#EXT-X-MEDIA:TYPE=AUDIO,URI="hls_manifest_a.m3u8",GROUP-ID="audio",LANGUAGE="en",NAME="ENGLISH",CHANNELS="2"
#EXT-X-STREAM-INF:BANDWIDTH=3264562,CODECS="avc1.42c01e,mp4a.40.2",RESOLUTION=1280x720,AUDIO="audio"
hls_manifest_v.m3u8
hls_manifest_a.m3u8
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version 2d025da-release
#EXT-X-TARGETDURATION:7
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="a/seg_0.mp4"
#EXTINF:5.016,
a/seg_1.m4s
#EXTINF:4.992,
a/seg_2.m4s
#EXTINF:4.992,
a/seg_3.m4s
#EXTINF:5.016,
a/seg_4.m4s
#EXTINF:0.697,
a/seg_5.m4s
#EXT-X-ENDLIST
hls_manifest_v.m3u8
#EXTM3U
#EXT-X-VERSION:6
## Generated with https://github.com/google/shaka-packager version 2d025da-release
#EXT-X-TARGETDURATION:7
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-MAP:URI="v/seg_0.mp4"
#EXTINF:6.208,
v/seg_1.m4s
#EXTINF:4.333,
v/seg_2.m4s
#EXTINF:6.750,
v/seg_3.m4s
#EXTINF:3.375,
v/seg_4.m4s
#EXT-X-ENDLIST
我错过了什么?