如何在Swiftui中显示字幕?
我想在avplayer中显示字幕,但是在我的代码中,一切都在起作用(视频& audio),但是字幕没有显示
我尝试了此答案:
70938118/17927980“> https://stackoverflow.com/a/70938118/17927980
但是我的播放器无法显示字幕,我该如何解决?
是否只能使用Avplayer或否显示字幕?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您从正确的URL中获得字幕吗?
然后,您需要将URL包含在WebVTT字幕中。
自从我上次与Avplayer一起流式传输内容以来已经很长时间了,但是Apple提供了一个出色的示例页面。
https://developer.apple.apple.apple.com/streaming/
you get your subtitles from an url correct?
Then you need to include the URL to your webVTT subtitles.
It's been a long time since i last take a look at streaming things with AVPLayer, but apple provides an excellent example page for streaming.
https://developer.apple.com/streaming/