зеркало из https://github.com/nextcloud/talk-ios.git
Merge pull request #1745 from nextcloud/support-mkv-files
Use VLC player for mkv files
This commit is contained in:
Коммит
8f50965dfd
|
@ -3387,8 +3387,8 @@ import QuickLook
|
|||
guard let fileLocalPath = fileStatus.fileLocalPath else { return }
|
||||
let fileExtension = URL(fileURLWithPath: fileLocalPath).pathExtension.lowercased()
|
||||
|
||||
// For WebM we use the VLCKitVideoViewController because the native PreviewController does not support WebM
|
||||
if fileExtension == "webm" {
|
||||
// Use VLCKitVideoViewController for file formats unsupported by the native PreviewController
|
||||
if VLCKitVideoViewController.supportedFileExtensions.contains(fileExtension) {
|
||||
let vlcKitViewController = VLCKitVideoViewController(filePath: fileLocalPath)
|
||||
vlcKitViewController.delegate = self
|
||||
vlcKitViewController.modalPresentationStyle = .fullScreen
|
||||
|
|
|
@ -267,9 +267,9 @@ import QuickLook
|
|||
self.previewControllerFilePath = fileLocalPath
|
||||
self.isPreviewControllerShown = true
|
||||
|
||||
let fileExtension = NSURL(fileURLWithPath: fileLocalPath).pathExtension
|
||||
let fileExtension = URL(fileURLWithPath: fileLocalPath).pathExtension.lowercased()
|
||||
|
||||
if fileExtension?.lowercased() == "webm" {
|
||||
if VLCKitVideoViewController.supportedFileExtensions.contains(fileExtension) {
|
||||
let vlcViewController = VLCKitVideoViewController(filePath: fileLocalPath)
|
||||
vlcViewController.delegate = self
|
||||
vlcViewController.modalPresentationStyle = .fullScreen
|
||||
|
|
|
@ -15,6 +15,8 @@ import MobileVLCKit
|
|||
|
||||
public weak var delegate: VLCKitVideoViewControllerDelegate?
|
||||
|
||||
public static let supportedFileExtensions = ["webm", "mkv"]
|
||||
|
||||
@IBOutlet weak var videoViewContainer: NCZoomableView!
|
||||
@IBOutlet weak var buttonView: UIStackView!
|
||||
@IBOutlet weak var jumpBackButton: UIButton!
|
||||
|
|
Загрузка…
Ссылка в новой задаче