getting YouTube quality events using WebView

584 Views Asked by At

I'm trying to get events regarding YouTube video quality changes and rate adaptation and I have realized that there is no way to do that by YouTube Android API and switched to WebView and iFrame. At least there are functions of getting quality and rate adaptation in description of YouTbe iFrame API but I didnt get how to implement iFrame API in combination with WebView to have access to player's function.
Did anybody have such experience and can share some basic logic?

1

There are 1 best solutions below

1
On

you can look at this project (android-youtube-player) to solve the problem of WebView-IFrame API interaction.

But it won't solve the problem of controlling the quality of playback. As you can read here the method for changing the quality is now a no-op. Therefore, while it's technically possible to receive quality change events, you won't receive any, because you won't be able to actually change the quality.

You can also refer to issue #27 and issue #101.