I am using the iOS YouTube Player helper (https://developers.google.com/youtube/v3/guides/ios_youtube_helper) and it works just fine but the preview image is not the size of my view and I can't figure out how to change it so it fits within the UIView I've created. How can I make it fill the view?
Here is what it looks like.

This solved it for me:
In the Assets folder there should be an html file named "YTPlayerView-iframe-player.html"
Replace the existing code between "style" tags as shown below and this will make sure the Player fills 100% of the YTPlayerView:
<style>
body { margin: 0; width:100%%; height:100%%; }
html { width:100%%; height:100%%; }
</style>
Hope this helps a bit! Have a great weekend!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With