marinofaggiana 4 жил өмнө
parent
commit
44c9511353

+ 5 - 5
Nextcloud.xcodeproj/project.pbxproj

@@ -236,7 +236,7 @@
 		F78F74342163757000C2ADAD /* NCTrash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F78F74332163757000C2ADAD /* NCTrash.storyboard */; };
 		F78F74362163781100C2ADAD /* NCTrash.swift in Sources */ = {isa = PBXBuildFile; fileRef = F78F74352163781100C2ADAD /* NCTrash.swift */; };
 		F790110E21415BF600D7B136 /* NCViewerRichdocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = F790110D21415BF600D7B136 /* NCViewerRichdocument.swift */; };
-		F79630EE215527D40015EEA5 /* NCViewerVideoCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F79630ED215527D40015EEA5 /* NCViewerVideoCommon.swift */; };
+		F79630EE215527D40015EEA5 /* NCVideoCommon.swift in Sources */ = {isa = PBXBuildFile; fileRef = F79630ED215527D40015EEA5 /* NCVideoCommon.swift */; };
 		F79728D422F96F2E003CACA7 /* NCShareLinkFolderMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F79728D322F96F2D003CACA7 /* NCShareLinkFolderMenuView.xib */; };
 		F79728D622F9A0B1003CACA7 /* NCShareUserFolderMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F79728D522F9A0B0003CACA7 /* NCShareUserFolderMenuView.xib */; };
 		F79918A221997FA300C2E308 /* UICKeyChainStore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F79918A021997F9000C2E308 /* UICKeyChainStore.framework */; };
@@ -586,7 +586,7 @@
 		F7956FC91B4886E60085DEA3 /* CCUploadFromOtherUpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCUploadFromOtherUpp.h; sourceTree = "<group>"; };
 		F7956FCA1B4886E60085DEA3 /* CCUploadFromOtherUpp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCUploadFromOtherUpp.m; sourceTree = "<group>"; };
 		F7956FCB1B4886E60085DEA3 /* CCUploadFromOtherUpp.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = CCUploadFromOtherUpp.storyboard; sourceTree = "<group>"; };
-		F79630ED215527D40015EEA5 /* NCViewerVideoCommon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerVideoCommon.swift; sourceTree = "<group>"; };
+		F79630ED215527D40015EEA5 /* NCVideoCommon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCVideoCommon.swift; sourceTree = "<group>"; };
 		F79728D322F96F2D003CACA7 /* NCShareLinkFolderMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareLinkFolderMenuView.xib; sourceTree = "<group>"; };
 		F79728D522F9A0B0003CACA7 /* NCShareUserFolderMenuView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCShareUserFolderMenuView.xib; sourceTree = "<group>"; };
 		F79918A021997F9000C2E308 /* UICKeyChainStore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UICKeyChainStore.framework; path = Carthage/Build/iOS/UICKeyChainStore.framework; sourceTree = "<group>"; };
@@ -1099,12 +1099,12 @@
 		F79018B1240962C7007C9B6D /* NCViewerImageVideoAudio */ = {
 			isa = PBXGroup;
 			children = (
+				F79630ED215527D40015EEA5 /* NCVideoCommon.swift */,
 				F70753F62542A9C000972D44 /* NCViewerImage.storyboard */,
 				F70753EA2542A99800972D44 /* NCViewerImagePageContainer.swift */,
-				F70753F02542A9A200972D44 /* NCViewerImageZoom.swift */,
 				F7C6E0D0254411D0007E35FE /* NCViewerImageVideo.storyboard */,
-				F79630ED215527D40015EEA5 /* NCViewerVideoCommon.swift */,
 				F7C6E0D6254411D8007E35FE /* NCViewerImageVideo.swift */,
+				F70753F02542A9A200972D44 /* NCViewerImageZoom.swift */,
 			);
 			path = NCViewerImageVideoAudio;
 			sourceTree = "<group>";
@@ -2147,7 +2147,7 @@
 				F765608F23BF813600765969 /* NCContentPresenter.swift in Sources */,
 				F70CEF5623E9C7E50007035B /* UIColor+adjust.swift in Sources */,
 				F75AC2431F1F62450073EC19 /* NCManageAutoUploadFileName.swift in Sources */,
-				F79630EE215527D40015EEA5 /* NCViewerVideoCommon.swift in Sources */,
+				F79630EE215527D40015EEA5 /* NCVideoCommon.swift in Sources */,
 				F7CA1ED620E7E3FE002CC65E /* CALayer+PKDownloadButtonAnimations.m in Sources */,
 				F7C7B489245EBA4100D93E60 /* NCViewerQuickLook.swift in Sources */,
 				F758B45E212C569D00515F55 /* ScanCell.swift in Sources */,

+ 2 - 2
iOSClient/AppDelegate.m

@@ -278,8 +278,8 @@
     [[NCBrandColor sharedInstance] settingThemingColor];
     
     // If AVPlayer in play -> Stop
-    if (NCViewerVideoCommon.shared.player != nil && NCViewerVideoCommon.shared.player.rate != 0) {
-        [NCViewerVideoCommon.shared.player pause];
+    if (NCVideoCommon.shared.player != nil && NCVideoCommon.shared.player.rate != 0) {
+        [NCVideoCommon.shared.player pause];
     }
     
     // close detail

+ 4 - 4
iOSClient/Viewer/NCViewerImageVideoAudio/NCViewerVideoCommon.swift → iOSClient/Viewer/NCViewerImageVideoAudio/NCVideoCommon.swift

@@ -1,5 +1,5 @@
 //
-//  NCViewerVideoCommon.swift
+//  NCVideoCommon.swift
 //  Nextcloud
 //
 //  Created by Marino Faggiana on 21/09/18.
@@ -24,9 +24,9 @@
 import Foundation
 import KTVHTTPCache
 
-class NCViewerVideoCommon: NSObject {
-    @objc static let shared: NCViewerVideoCommon = {
-        let viewVideo = NCViewerVideoCommon()
+class NCVideoCommon: NSObject {
+    @objc static let shared: NCVideoCommon = {
+        let viewVideo = NCVideoCommon()
         viewVideo.setupHTTPCache()
         return viewVideo
     }()

+ 6 - 6
iOSClient/Viewer/NCViewerImageVideoAudio/NCViewerImageVideo.swift

@@ -45,18 +45,18 @@ class NCViewerImageVideo: UIViewController {
         closeView.layer.cornerRadius = 7
         closeView.backgroundColor = UIColor(red: 36.0/255.0, green: 36.0/255.0, blue: 36.0/255.0, alpha: 1.0)
         
-        NCViewerVideoCommon.shared.viewMedia(metadata, view: videoView, frame: CGRect(x: 0, y: 0, width: videoView.frame.width, height: videoView.frame.height))
+        NCVideoCommon.shared.viewMedia(metadata, view: videoView, frame: CGRect(x: 0, y: 0, width: videoView.frame.width, height: videoView.frame.height))
     }
     
     @IBAction func touchUpInsidecloseButton(_ sender: Any) {
         
-        if NCViewerVideoCommon.shared.player != nil && NCViewerVideoCommon.shared.player.rate != 0 {
-            NCViewerVideoCommon.shared.player.pause()
+        if NCVideoCommon.shared.player != nil && NCVideoCommon.shared.player.rate != 0 {
+            NCVideoCommon.shared.player.pause()
         }
         
-        if NCViewerVideoCommon.shared.isMediaObserver {
-            NCViewerVideoCommon.shared.isMediaObserver = false
-            NCViewerVideoCommon.shared.removeObserver()
+        if NCVideoCommon.shared.isMediaObserver {
+            NCVideoCommon.shared.isMediaObserver = false
+            NCVideoCommon.shared.removeObserver()
         }
 
         dismiss(animated: false) { }