|
@@ -93,8 +93,12 @@ class NCPlayer: NSObject {
|
|
|
|
|
|
playerToolBar?.setBarPlayer(ncplayer: self, position: positionSliderToolBar, metadata: metadata, viewerMediaPage: viewerMediaPage)
|
|
|
|
|
|
- if autoplay {
|
|
|
- player.play()
|
|
|
+ DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
|
|
+ self.player.play()
|
|
|
+ if !autoplay {
|
|
|
+ self.player.pause()
|
|
|
+ self.player.position = 0
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterApplicationDidEnterBackground), object: nil)
|