Browse Source

Fix varius

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 3 years ago
parent
commit
458aef02b8

+ 5 - 3
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -87,17 +87,19 @@ class NCPlayer: NSObject {
         deactivateObserver()
     }
 
-    internal func openAVPlayer() {
+    func openAVPlayer() {
 
 #if MFFFLIB
+        MFFF.shared.setDelegate = self
+        MFFF.shared.dismissMessage()
+        NotificationCenter.default.addObserver(self, selector: #selector(convertVideoDidFinish(_:)), name: NSNotification.Name(rawValue: self.metadata.ocId), object: nil)
+
         if CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: NCGlobal.shared.fileNameVideoEncoded) {
             self.url = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: NCGlobal.shared.fileNameVideoEncoded))
             self.isProxy = false
         }
         if MFFF.shared.existsMFFFSession(url: URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView))) {
             return
-        } else {
-            MFFF.shared.dismissMessage()
         }
 #endif
 

+ 1 - 1
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCSubtitle/NCSubtitlePlayer.swift

@@ -164,7 +164,7 @@ extension NCPlayer {
     }
 
     func open(fileFromLocal filePath: URL) {
-        print("Subtitle filePath \(filePath)")
+
         subtitleLabel?.text = ""
 
         self.loadText(filePath: filePath) { contents in