Skip to content

Commit

Permalink
Add networkStatus property.
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Mar 6, 2018
1 parent bb65094 commit 9523d7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion SJBaseVideoPlayer.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'SJBaseVideoPlayer'
s.version = '1.0.2'
s.version = '1.0.2.1'
s.summary = 'video player.'
s.description = 'https://github.com/changsanjiang/SJBaseVideoPlayer/blob/master/README.md'
s.homepage = 'https://github.com/changsanjiang/SJBaseVideoPlayer'
Expand Down
6 changes: 5 additions & 1 deletion SJBaseVideoPlayer/SJBaseVideoPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ - (instancetype)init {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];
if ( error ) NSLog(@"%@", error.userInfo);
self.autoPlay = YES;
self.enableControlLayerDisplayController = YES;
self.enableControlLayerDisplayController = YES;
[self registrar];
[self view];
[self reachabilityObserver];
Expand Down Expand Up @@ -1473,6 +1473,10 @@ - (void)_reachabilityChangedNotification {
}
}

- (SJNetworkStatus)networkStatus {
return (NSInteger)[self.reachability currentReachabilityStatus];
}

- (void)dealloc {
[_reachability stopNotifier];
[[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:_reachability];
Expand Down

0 comments on commit 9523d7b

Please sign in to comment.