Browse Source

remove old code

Marino Faggiana 2 years ago
parent
commit
6498b83abd

+ 2 - 18
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -95,20 +95,6 @@ class NCPlayer: NSObject {
         self.url = url
         self.singleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didSingleTapWith(gestureRecognizer:)))
 
-#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) {
-            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
-        }
-#endif
-
         print("Play URL: \(url)")
         player = VLCMediaPlayer()
         player?.media = VLCMedia(url: url)
@@ -156,7 +142,7 @@ class NCPlayer: NSObject {
 
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidEnterBackground), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidBecomeActive), object: nil)
-        
+
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterPauseMedia), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterPlayMedia), object: nil)
     }
@@ -273,9 +259,7 @@ class NCPlayer: NSObject {
                 if CCUtility.fileProviderStorageExists(self.metadata) || self.metadata.isDirectoryE2EE {
                     let url = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(self.metadata.ocId, fileNameView: self.metadata.fileNameView))
                     if requiredConvert {
-#if MFFFLIB
-                        self.convertVideo(withAlert: false)
-#endif
+
                     } else {
                         self.openAVPlayer(url: url)
                     }

+ 0 - 7
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -227,13 +227,6 @@ class NCPlayerToolBar: UIView {
         guard let metadata = self.metadata, ncplayer != nil, !metadata.livePhoto else { return }
         if metadata.classFile != NKCommon.TypeClassFile.video.rawValue && metadata.classFile != NKCommon.TypeClassFile.audio.rawValue { return }
 
-#if MFFFLIB
-        if MFFF.shared.existsMFFFSession(url: URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView))) {
-            self.hide()
-            return
-        }
-#endif
-
         timerAutoHide?.invalidate()
         if enableTimerAutoHide {
             startTimerAutoHide()