SvenTiigi / YouTubePlayerKit

A Swift Package to easily play YouTube videos 📺
https://sventiigi.github.io/YouTubePlayerKit/
MIT License
717 stars 64 forks source link

Zooming feature #80

Closed e-vazquez closed 10 months ago

e-vazquez commented 10 months ago

Is your feature request related to a problem?

The player fits the video horizontally and the height is calculated proportionally. If the View frame is larger than the video, black background is shown.

What solution would you like?

Any chance to have the option to zoom the video filling the container and clipping if necessary? If I have a frame container of 200x200, I would like that the video covers the frame clipping the outside content.

What alternatives have you considered?

No alternatives considered.

Any additional context?

No response

SvenTiigi commented 10 months ago

Hi @e-vazquez,

Thanks for opening up an issue.

As the YouTubePlayerKit is using the official YouTube iFrame Player iFrame API the resulting user interface is controlled and managed by YouTube.

Sadly YouTube doesn't provide a API or parameter to change the content mode to a fill or fit option.