デフォルト モードでは、ユーザーがピクチャー イン ピクチャーを開始すると、小さなウィンドウが最新の位置 (最新の pip ウィンドウの閉じた位置) から開始されます。
左上、右上、左下、右下のような開始位置を設定する方法はありますか?
デフォルト モードでは、ユーザーがピクチャー イン ピクチャーを開始すると、小さなウィンドウが最新の位置 (最新の pip ウィンドウの閉じた位置) から開始されます。
左上、右上、左下、右下のような開始位置を設定する方法はありますか?
There is no way to set the starting position of an AVPictureInPictureController.
There isn't really a reason to set the location (it's going to be on top of other apps, not your own), and the user can change the location of it at anytime, out of your control.
From the AVPictureInPictureController documentation:
If an app invokes PiP in a way that is not under the immediate direction of the user, it will be rejected by the App Store.
Also, it is also not suggested to create a subclass of AVPictureInPictureController:
Do not subclass AVPictureInPictureController. Overriding this class’s methods is unsupported and results in undefined behavior.
Creating the functionality of this would require the use of private APIs anyways, and that's a guaranteed rejection by Apple.