Skip to content

Commit

Permalink
Correct empty sound state
Browse files Browse the repository at this point in the history
  • Loading branch information
saiday committed Jul 20, 2015
1 parent c11cfdd commit 5ca62da
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>7AE0F113-DE32-477D-9922-892545828212</string>
<key>IDESourceControlProjectName</key>
<string>HyseteriaSamples</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>64A8F64E623EB3EEC13CC1B62654DF0D190B87A8</key>
<string>github.com:StreetVoice/HysteriaPlayer.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>HyseteriaSamples/HyseteriaSamples.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>64A8F64E623EB3EEC13CC1B62654DF0D190B87A8</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>github.com:StreetVoice/HysteriaPlayer.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>64A8F64E623EB3EEC13CC1B62654DF0D190B87A8</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>64A8F64E623EB3EEC13CC1B62654DF0D190B87A8</string>
<key>IDESourceControlWCCName</key>
<string>HysteriaPlayer</string>
</dict>
</array>
</dict>
</plist>
2 changes: 1 addition & 1 deletion HysteriaPlayer/HysteriaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
AVPlayerItem *newPlayerItem = [change objectForKey:NSKeyValueChangeNewKey];
AVPlayerItem *lastPlayerItem = [change objectForKey:NSKeyValueChangeOldKey];
if (lastPlayerItem != (id)[NSNull null]) {
self.isInEmptySound = NO;
@try {
[lastPlayerItem removeObserver:self forKeyPath:@"loadedTimeRanges" context:nil];
[lastPlayerItem removeObserver:self forKeyPath:@"status" context:nil];
Expand All @@ -680,6 +679,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
if ([self.delegate respondsToSelector:@selector(hysteriaPlayerCurrentItemChanged:)]) {
[self.delegate hysteriaPlayerCurrentItemChanged:newPlayerItem];
}
self.isInEmptySound = NO;
}
}

Expand Down

0 comments on commit 5ca62da

Please sign in to comment.