disable NSLogs in Darwin AudioPlayer (#264)
This commit is contained in:
parent
787370f471
commit
2cb1c04dfe
|
@ -134,7 +134,7 @@
|
||||||
result(FlutterMethodNotImplemented);
|
result(FlutterMethodNotImplemented);
|
||||||
}
|
}
|
||||||
} @catch (id exception) {
|
} @catch (id exception) {
|
||||||
NSLog(@"Error in handleMethodCall");
|
//NSLog(@"Error in handleMethodCall");
|
||||||
FlutterError *flutterError = [FlutterError errorWithCode:@"error" message:@"Error in handleMethodCall" details:nil];
|
FlutterError *flutterError = [FlutterError errorWithCode:@"error" message:@"Error in handleMethodCall" details:nil];
|
||||||
result(flutterError);
|
result(flutterError);
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
} else if (drift < -100) {
|
} else if (drift < -100) {
|
||||||
[self enterBuffering:@"stalling"];
|
[self enterBuffering:@"stalling"];
|
||||||
NSLog(@"Drift: %lld", drift);
|
//NSLog(@"Drift: %lld", drift);
|
||||||
[self updatePosition];
|
[self updatePosition];
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
}
|
}
|
||||||
|
@ -632,16 +632,16 @@
|
||||||
|
|
||||||
- (void)onItemStalled:(NSNotification *)notification {
|
- (void)onItemStalled:(NSNotification *)notification {
|
||||||
//IndexedPlayerItem *playerItem = (IndexedPlayerItem *)notification.object;
|
//IndexedPlayerItem *playerItem = (IndexedPlayerItem *)notification.object;
|
||||||
NSLog(@"onItemStalled");
|
//NSLog(@"onItemStalled");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)onFailToComplete:(NSNotification *)notification {
|
- (void)onFailToComplete:(NSNotification *)notification {
|
||||||
//IndexedPlayerItem *playerItem = (IndexedPlayerItem *)notification.object;
|
//IndexedPlayerItem *playerItem = (IndexedPlayerItem *)notification.object;
|
||||||
NSLog(@"onFailToComplete");
|
//NSLog(@"onFailToComplete");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)onComplete:(NSNotification *)notification {
|
- (void)onComplete:(NSNotification *)notification {
|
||||||
NSLog(@"onComplete");
|
//NSLog(@"onComplete");
|
||||||
|
|
||||||
IndexedPlayerItem *endedPlayerItem = (IndexedPlayerItem *)notification.object;
|
IndexedPlayerItem *endedPlayerItem = (IndexedPlayerItem *)notification.object;
|
||||||
IndexedAudioSource *endedSource = endedPlayerItem.audioSource;
|
IndexedAudioSource *endedSource = endedPlayerItem.audioSource;
|
||||||
|
@ -731,7 +731,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case AVPlayerItemStatusFailed: {
|
case AVPlayerItemStatusFailed: {
|
||||||
NSLog(@"AVPlayerItemStatusFailed");
|
//NSLog(@"AVPlayerItemStatusFailed");
|
||||||
[self sendErrorForItem:playerItem];
|
[self sendErrorForItem:playerItem];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -753,7 +753,7 @@
|
||||||
_bufferUnconfirmed = NO;
|
_bufferUnconfirmed = NO;
|
||||||
[self leaveBuffering:@"playing, _bufferUnconfirmed && playbackBufferFull"];
|
[self leaveBuffering:@"playing, _bufferUnconfirmed && playbackBufferFull"];
|
||||||
[self updatePosition];
|
[self updatePosition];
|
||||||
NSLog(@"Buffering confirmed! leaving buffering");
|
//NSLog(@"Buffering confirmed! leaving buffering");
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -788,7 +788,7 @@
|
||||||
[self updatePosition];
|
[self updatePosition];
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
} else {
|
} else {
|
||||||
NSLog(@"Ignoring wait signal because we reached the end");
|
//NSLog(@"Ignoring wait signal because we reached the end");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AVPlayerTimeControlStatusPlaying:
|
case AVPlayerTimeControlStatusPlaying:
|
||||||
|
@ -805,11 +805,11 @@
|
||||||
if ([_orderInv[_index] intValue] + 1 < [_order count]) {
|
if ([_orderInv[_index] intValue] + 1 < [_order count]) {
|
||||||
// account for automatic move to next item
|
// account for automatic move to next item
|
||||||
_index = [_order[[_orderInv[_index] intValue] + 1] intValue];
|
_index = [_order[[_orderInv[_index] intValue] + 1] intValue];
|
||||||
NSLog(@"advance to next on error: index = %d", _index);
|
//NSLog(@"advance to next on error: index = %d", _index);
|
||||||
[self updateEndAction];
|
[self updateEndAction];
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
} else {
|
} else {
|
||||||
NSLog(@"error on last item");
|
//NSLog(@"error on last item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -817,7 +817,7 @@
|
||||||
if (_index != expectedIndex) {
|
if (_index != expectedIndex) {
|
||||||
// AVQueuePlayer will sometimes skip over error items without
|
// AVQueuePlayer will sometimes skip over error items without
|
||||||
// notifying this observer.
|
// notifying this observer.
|
||||||
NSLog(@"Queue change detected. Adjusting index from %d -> %d", _index, expectedIndex);
|
//NSLog(@"Queue change detected. Adjusting index from %d -> %d", _index, expectedIndex);
|
||||||
_index = expectedIndex;
|
_index = expectedIndex;
|
||||||
[self updateEndAction];
|
[self updateEndAction];
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
|
@ -896,7 +896,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendError:(FlutterError *)flutterError playerItem:(IndexedPlayerItem *)playerItem {
|
- (void)sendError:(FlutterError *)flutterError playerItem:(IndexedPlayerItem *)playerItem {
|
||||||
NSLog(@"sendError");
|
//NSLog(@"sendError");
|
||||||
if (_loadResult && playerItem == _player.currentItem) {
|
if (_loadResult && playerItem == _player.currentItem) {
|
||||||
_loadResult(flutterError);
|
_loadResult(flutterError);
|
||||||
_loadResult = nil;
|
_loadResult = nil;
|
||||||
|
@ -936,7 +936,7 @@
|
||||||
}
|
}
|
||||||
if (result) {
|
if (result) {
|
||||||
if (_playResult) {
|
if (_playResult) {
|
||||||
NSLog(@"INTERRUPTING PLAY");
|
//NSLog(@"INTERRUPTING PLAY");
|
||||||
_playResult(@{});
|
_playResult(@{});
|
||||||
}
|
}
|
||||||
_playResult = result;
|
_playResult = result;
|
||||||
|
@ -960,7 +960,7 @@
|
||||||
[self updatePosition];
|
[self updatePosition];
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
if (_playResult) {
|
if (_playResult) {
|
||||||
NSLog(@"PLAY FINISHED DUE TO PAUSE");
|
//NSLog(@"PLAY FINISHED DUE TO PAUSE");
|
||||||
_playResult(@{});
|
_playResult(@{});
|
||||||
_playResult = nil;
|
_playResult = nil;
|
||||||
}
|
}
|
||||||
|
@ -971,7 +971,7 @@
|
||||||
_processingState = completed;
|
_processingState = completed;
|
||||||
[self broadcastPlaybackEvent];
|
[self broadcastPlaybackEvent];
|
||||||
if (_playResult) {
|
if (_playResult) {
|
||||||
NSLog(@"PLAY FINISHED DUE TO COMPLETE");
|
//NSLog(@"PLAY FINISHED DUE TO COMPLETE");
|
||||||
_playResult(@{});
|
_playResult(@{});
|
||||||
_playResult = nil;
|
_playResult = nil;
|
||||||
}
|
}
|
||||||
|
@ -1037,7 +1037,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setShuffleModeEnabled:(BOOL)shuffleModeEnabled {
|
- (void)setShuffleModeEnabled:(BOOL)shuffleModeEnabled {
|
||||||
NSLog(@"setShuffleModeEnabled: %d", shuffleModeEnabled);
|
//NSLog(@"setShuffleModeEnabled: %d", shuffleModeEnabled);
|
||||||
_shuffleModeEnabled = shuffleModeEnabled;
|
_shuffleModeEnabled = shuffleModeEnabled;
|
||||||
if (!_audioSource) return;
|
if (!_audioSource) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue