SvenTiigi / YouTubePlayerKit

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

Ability to control going in and out of fullscreen #70

Closed kiddosai closed 1 year ago

kiddosai commented 1 year ago

Is your feature request related to a problem?

It seems all actions such as play, mute, ... have been exposed but not fullscreen.

What solution would you like?

Maybe something like that? youTubePlayer.toggleFullscreen youTubePlayer.isFullscreen

configuration { autoFullscreen: true }

What alternatives have you considered?

If I use my own Swift view with a UIViewRepresentable WKWebView loading the video URL automatically goes to fullscreen.

Any additional context?

No response

SvenTiigi commented 1 year ago

Hi @kiddosai,

Unfortunately, there is no API for programmatically launching full-screen mode in either WebKit or the YouTube Player iFrame JS API.