Преглед на файлове

media player: resume playing if playback was active; prevent from playback resume in background even if corresponding option is disabled in settings (should fix #9225)

VLC::pause works as toggle play/pause. If playback is paused already sequential Pause will lead to Play action
Gleb Pinigin преди 12 години
родител
ревизия
6c243fa431
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      AspenProject/VLCMovieViewController.m

+ 4 - 2
AspenProject/VLCMovieViewController.m

@@ -977,8 +977,10 @@
     _mediaPlayer.currentVideoTrackIndex = 0;
 
     if (![[[NSUserDefaults standardUserDefaults] objectForKey:kVLCSettingContinueAudioInBackgroundKey] boolValue]) {
-        [_mediaPlayer pause];
-        _shouldResumePlaying = YES;
+        if ([_mediaPlayer isPlaying]) {
+            [_mediaPlayer pause];
+            _shouldResumePlaying = YES;
+        }
     }
 
     glFinish();