我们可以使用Safari浏览器或WKWebView获得正常质量的YouTube视频吗? [英] Can we get normal quality of YouTube video using Safari browser or WKWebView?
问题描述
还是只有通过iOS上的官方YouTube应用程序才能获得高质量?
Or good quality is only possible with official YouTube app on iOS?
我试图使用下一个iOS库在我的应用中播放YouTube,但它始终选择medium
质量,并且无法更改
I was trying to use the next iOS libraries to play YouTube in my app but it always chooses medium
quality and it can't be changed
https://github.com/youtube/youtube-ios-player-helper
https://github.com/gilesvangruisen/Swift-YouTube-Player
YouTube IFrame API方法没有任何改变:
YouTube IFrame API methods don't change anything:
player.setPlaybackQuality(suggestedQuality:String):Void
loadVideoById({'videoId': 'bHQqvYy5KYo', 'suggestedQuality': 'large'});
iPhone Simulator XR(iOS 12.2)中的Safari浏览器:
Safari browser from iPhone Simulator XR (iOS 12.2):
我正在尝试更改视频的质量,该视频绝对具有全高清质量,但只有在Safari应用中进行测试时,才能提供最大360p的视频:
I'm trying to change quality for a video which definitely has full hd quality but 360p as maximum is only available when I test in Safari app:
更新
在真实设备(iPhone 6s)上进行了测试-同样的问题,只有官方的YouTube应用允许设置正常质量.
Tested on real device (iPhone 6s) - the same problem, only official YouTube app allows to set normal quality.
Chrome浏览器也不允许更改质量
Chrome Browser also doesn't allow to change quality
更新2
var qualities = player.getAvailableQualityLevels();
-对于完整的高清视频,它返回medium, auto
var qualities = player.getAvailableQualityLevels();
- it returns medium, auto
for full hd videos
推荐答案
没有解决方案.
Apple随处替换YouTube播放器.他们将质量限制为360p.尽管他们删除了广告.只有Google提供的YouTube官方应用中才能提供高质量的视频
Apple replaces YouTube player with their own everywhere. They limit quality to 360p. Though they remove ads. Good quality is only available in YouTube official app from Google
这篇关于我们可以使用Safari浏览器或WKWebView获得正常质量的YouTube视频吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!