Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0c committed Jul 17, 2016
1 parent 0badd25 commit 2024ede
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
16 changes: 11 additions & 5 deletions Example/LMMediaPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = LM;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Akira Matsuda";
TargetAttributes = {
6003F589195388D20070C39A = {
Expand Down Expand Up @@ -612,12 +612,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand All @@ -630,7 +633,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -652,18 +655,21 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.1;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -680,7 +686,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "LMMediaPlayer/LMMediaPlayer-Prefix.pch";
INFOPLIST_FILE = "LMMediaPlayer/LMMediaPlayer-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -698,7 +704,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "LMMediaPlayer/LMMediaPlayer-Prefix.pch";
INFOPLIST_FILE = "LMMediaPlayer/LMMediaPlayer-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion LMMediaPlayer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "LMMediaPlayer"
s.version = "0.5.0"
s.version = "0.5.1"
s.summary = "Video and audio player with replaceable UI component."
s.homepage = "https://github.com/0x0c/LMMediaPlayer"

Expand Down
1 change: 1 addition & 0 deletions Pod/Classes/MediaPlayer/LMMediaPlayer/LMMediaPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ extern NSString *const LMMediaPlayerStopNotification;
@property (nonatomic, assign) LMMediaRepeatMode repeatMode;
@property (nonatomic, readonly) BOOL shuffleMode;
@property (nonatomic, readonly) NSInteger index;
@property (nonatomic, readonly) NSString *currentAudioSessionCategory;

+ (instancetype)sharedPlayer;
- (AVPlayer *)corePlayer;
Expand Down
6 changes: 3 additions & 3 deletions Pod/Classes/MediaPlayer/LMMediaPlayer/LMMediaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (instancetype)init
self.currentQueue = queue_;
_repeatMode = LMMediaRepeatModeDefault;
_shuffleMode = YES;

_currentAudioSessionCategory = AVAudioSessionCategoryPlayback;
NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter addObserver:self selector:@selector(pause) name:LMMediaPlayerPauseNotification object:nil];
[notificationCenter addObserver:self selector:@selector(stop) name:LMMediaPlayerStopNotification object:nil];
Expand Down Expand Up @@ -419,7 +419,7 @@ - (void)setCurrentState:(LMMediaPlaybackState)state
[self updateLockScreenInfo];
NSError *e = nil;
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayback error:&e];
[audioSession setCategory:self.currentAudioSessionCategory error:&e];
[audioSession setActive:YES error:NULL];
}

Expand Down Expand Up @@ -451,7 +451,7 @@ - (NSError *)setAudioSessionCategory:(NSString *)category
NSError *e = nil;
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:category error:&e];

_currentAudioSessionCategory = category;
return e;
}
#pragma mark - Observer
Expand Down

0 comments on commit 2024ede

Please sign in to comment.