|
@@ -224,17 +224,26 @@ class NCPlayer: NSObject {
|
|
|
func playerPlay() {
|
|
|
|
|
|
appDelegate.player?.play()
|
|
|
+ self.playerToolBar?.updateToolBar()
|
|
|
}
|
|
|
|
|
|
func playerPause() {
|
|
|
|
|
|
appDelegate.player?.pause()
|
|
|
+ self.playerToolBar?.updateToolBar()
|
|
|
|
|
|
if let pictureInPictureController = pictureInPictureController, pictureInPictureController.isPictureInPictureActive {
|
|
|
pictureInPictureController.stopPictureInPicture()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func videoSeek(time: CMTime) {
|
|
|
+
|
|
|
+ appDelegate.player?.seek(to: time)
|
|
|
+ playerToolBar?.updateToolBar(timeSeek: time)
|
|
|
+ self.saveTime(time)
|
|
|
+ }
|
|
|
+
|
|
|
func saveTime(_ time: CMTime) {
|
|
|
guard let metadata = self.metadata else { return }
|
|
|
if metadata.classFile == NCCommunicationCommon.typeClassFile.audio.rawValue { return }
|
|
@@ -250,12 +259,6 @@ class NCPlayer: NSObject {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- func videoSeek(time: CMTime) {
|
|
|
-
|
|
|
- appDelegate.player?.seek(to: time)
|
|
|
- self.saveTime(time)
|
|
|
- }
|
|
|
-
|
|
|
@objc func generatorImagePreview() {
|
|
|
guard let time = appDelegate.player?.currentTime() else { return }
|
|
|
guard let metadata = self.metadata else { return }
|