Skip to content

Commit

Permalink
Merge pull request #69 from hudashot/streamtitle
Browse files Browse the repository at this point in the history
Use empty string instead of missing StreamTitle.
  • Loading branch information
tlenclos committed Feb 15, 2017
2 parents b9ad147 + d4c94c0 commit 7ded132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/ReactNativeAudioStreaming.m
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ - (void)audioPlayer:(STKAudioPlayer *)player unexpectedError:(STKAudioPlayerErro
- (void)audioPlayer:(STKAudioPlayer *)audioPlayer didReadStreamMetadata:(NSDictionary *)dictionary {
NSLog(@"AudioPlayer SONG NAME %@", dictionary[@"StreamTitle"]);

self.currentSong = dictionary[@"StreamTitle"];
self.currentSong = dictionary[@"StreamTitle"] ? dictionary[@"StreamTitle"] : @"";
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{
@"status": @"METADATA_UPDATED",
@"key": @"StreamTitle",
@"value": dictionary[@"StreamTitle"]
@"value": self.currentSong
}];
[self setNowPlayingInfo:true];
}
Expand Down

0 comments on commit 7ded132

Please sign in to comment.