Overhauled media player#4007
Conversation
…d/ios/stratoionos/easy-storage into feature/mediaQueue-stable-33.0.0
…ue-stable-33.0.2 # Conflicts: # Nextcloud.xcodeproj/project.pbxproj
|
Hi, thanks for the details! "It is proposed to use VLC as the main player and AVKit for PiP mode."
"AVKit supports fewer formats, so in some cases PiP may not be available and an error message will need to be shown."
"Additional logic will be required to preserve the selected audio track when switching between players."
"Subtitles may not be supported in the PiP floating window (please confirm if they are required)."
|
|
Just as a side note, would be great if you could sign future commits so DCO passes: https://github.com/nextcloud/ios/pull/4007/checks?check_run_id=64965106498 I set it to passed manually for the current commits. |
|
|
Hi, Regarding the video part, and considering that the video simply runs within a normal UIView or View, you can check whether the video is playable with AVFoundation (a very simple function to write and quick to execute). If it doesn't (for example, a MKV or WebM etc.), it will open VLC within the view. Releasing a version that can no longer open videos with VLC-view is definitely not a choice I feel comfortable making, given that AVFoundation is very poor in codecs. |
|
Hi,
Since AVKit, AVFoundation, and VLCKit all rely on UIKit, the PiP feature doesn’t require SwiftUI. For now, it’s simpler to stick with UIKit.
That’s feasible — we can implement that.
Understood — thanks for the clarification. So the plan is to support opening video files with AVKit, and if AVKit doesn’t support the format, we’ll fall back to opening the video with VLCKit. |
Yes, exactly, AVFoundation offers all the possibilities to verify this. About swiftUI It's still a step that needs to be taken, the current code is far too tangled (even if it works), even if the videos use UIKit we can easily embed it inside a simple SwiftUI View with minus line of code, I just need to find the right timeline to start ... |
Hi team,
Our investigation helped us identify the following approach for implementing Picture-in-Picture (PiP) on iOS.
It is proposed to use VLC as the main player and AVKit for PiP mode.
A seamless transition between full-screen playback and PiP will not be possible. When switching modes, playback will need to be stopped in one player and started in the other, which will result in a short delay.
Key considerations: