Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift')
-rw-r--r--iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift30
1 files changed, 7 insertions, 23 deletions
diff --git a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift
index b266024f4..24212b7ec 100644
--- a/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift
+++ b/iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift
@@ -22,7 +22,7 @@
//
import Foundation
-import NCCommunication
+import NextcloudKit
import CoreMedia
import UIKit
import AVKit
@@ -116,11 +116,7 @@ class NCPlayerToolBar: UIView {
backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .lightGray), for: .normal)
backButton.isEnabled = false
- if #available(iOS 13.0, *) {
- playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
- } else {
- playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, size: 30), for: .normal)
- }
+ playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .lightGray, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
playButton.isEnabled = false
forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .lightGray), for: .normal)
@@ -179,7 +175,7 @@ class NCPlayerToolBar: UIView {
// PIP
if let pipButton = pipButton {
- if metadata?.classFile == NCCommunicationCommon.typeClassFile.video.rawValue && AVPictureInPictureController.isPictureInPictureSupported() {
+ if metadata?.classFile == NKCommon.typeClassFile.video.rawValue && AVPictureInPictureController.isPictureInPictureSupported() {
pipButton.setImage(NCUtility.shared.loadImage(named: "pip.enter", color: .white), for: .normal)
pipButton.isEnabled = true
} else {
@@ -197,11 +193,7 @@ class NCPlayerToolBar: UIView {
labelLeftTime.text = "-" + NCUtility.shared.stringFromTime(ncplayer.durationTime - time)
// BACK
- if #available(iOS 13.0, *) {
- backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
- } else {
- backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white, size: 30), for: .normal)
- }
+ backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white), for: .normal)
backButton.isEnabled = true
// PLAY
@@ -211,19 +203,11 @@ class NCPlayerToolBar: UIView {
MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyPlaybackRate] = 0
}
let namedPlay = ncplayer.isPlay() ? "pause.fill" : "play.fill"
- if #available(iOS 13.0, *) {
- playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
- } else {
- playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, size: 30), for: .normal)
- }
+ playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
playButton.isEnabled = true
// FORWARD
- if #available(iOS 13.0, *) {
- forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white), for: .normal)
- } else {
- forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white, size: 30), for: .normal)
- }
+ forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .white), for: .normal)
forwardButton.isEnabled = true
}
@@ -280,7 +264,7 @@ class NCPlayerToolBar: UIView {
public func show(enableTimerAutoHide: Bool = false) {
guard let metadata = self.metadata, ncplayer != nil, !metadata.livePhoto else { return }
- if metadata.classFile != NCCommunicationCommon.typeClassFile.video.rawValue && metadata.classFile != NCCommunicationCommon.typeClassFile.audio.rawValue { 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))) {