I tried to put player.setPlaybackQuality('hd720');
in onReady
and onStateChange
but nothing of that works (iPad or iPhone always starts with medium quality and it can't be changed)
Even setting small
quality doesn't change anything, these functions just doesn't work with iOS's UIWebView/WKWebView
I also tried to play with size of elements in html just for fun (set hardcoded size, like 1920x1080px) but it also didn't work:
<head>
<style>
* { margin: 0; padding: 0; }
html, body { width: 1920px; height: 1080px; }
</style>
</head>
<body>
<div id="player" width="1920px" height="1080px"></div>
This answer is quite popular to similar questions on Stackoverflow but even this one doesn't work for iOS
I use this library to play YouTube video: https://github.com/gilesvangruisen/Swift-YouTube-Player
It's based on YouTube iframe API + iOS WebView
The official iOS YouTube helper library works the same way
p.s. html code: https://github.com/gilesvangruisen/Swift-YouTube-Player/blob/master/YouTubePlayer/YouTubePlayer/YTPlayer.html
WebView iOS implementation: https://github.com/gilesvangruisen/Swift-YouTube-Player/blob/master/YouTubePlayer/YouTubePlayer/YouTubePlayer.swift
Update
I also tried: player.loadVideoById({'videoId': 'bHQqvYy5KYo', 'suggestedQuality': 'hd720'});
but still no progress