Browse Source

Bug fixes and new iPad Launch Screen

- Bump React and React Native Video to address Wake Delay/BSOD bug
- Add iPad launch screen provided by Jeremiah
- Lock the deps down with a new Shrinkwrap
master
Josh Habdas 5 years ago
parent
commit
d5122c3557
17 changed files with 900 additions and 428 deletions
  1. +4
    -3
      README.md
  2. +38
    -36
      WLPN.xcodeproj/project.pbxproj
  3. +0
    -0
      iOS/Base.lproj/LaunchScreen~iphone.xib
  4. +39
    -51
      iOS/Classes/AudioManager.m
  5. +12
    -0
      iOS/Images.xcassets/LaunchIpad.imageset/Contents.json
  6. BIN
      iOS/Images.xcassets/LaunchIpad.imageset/LumpenAppScreen-03.pdf
  7. +0
    -0
      iOS/Images.xcassets/LaunchIphone.imageset/Contents.json
  8. +0
    -0
      iOS/Images.xcassets/LaunchIphone.imageset/LumpenAppScreen-375x667.pdf
  9. +1
    -1
      iOS/Info.plist
  10. +30
    -0
      iOS/LaunchScreen~ipad.xib
  11. +0
    -0
      iOS/RootViewController.swift
  12. +765
    -329
      npm-shrinkwrap.json
  13. +4
    -4
      package.json
  14. BIN
      screenshot.png
  15. +0
    -1
      src/components/App.jsx
  16. +5
    -2
      src/styles.es6
  17. +2
    -1
      webpack-watch.js

+ 4
- 3
README.md View File

@ -27,15 +27,16 @@ The [Lumpen Radio](http://lumpenradio.com) App is here. Almost...
- [x] Icon long-press restarts stream
- [ ] Support Control Center / Remote Control events (thanks to Wayne Wright for the suggestion)
- [ ] Long-pauses restart stream
- [ ] Add now playing meta data
- [ ] Add now playing metadata (if available)
- [ ] Provide on-air off-air user feedback
## Known issues
- [ ] Background video delays device wake then turns black. https://github.com/brentvatne/react-native-video/issues/44
- [x] [Background video delays device wake then turns black](https://github.com/brentvatne/react-native-video/issues/44).
- [x] Audio stream does not automatically restart after some device interruptions (e.g. incoming call sent to voice mail)
- [ ] Audio buffer out after 20 seconds of interrupted call time followed by 20 seconds of play
- [ ] Play button does not function when disconnected from the Internet
- [ ] Launch screen skews on iPad
- [x] Launch screen skews on iPad
## Getting started

+ 38
- 36
WLPN.xcodeproj/project.pbxproj View File

@ -7,7 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */; };
008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302B41ABCB8E700DB3ED1 /* libRCTAdSupport.a */; };
@ -18,11 +17,12 @@
00E356F31AD99517003FC87E /* WLPNTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* WLPNTests.m */; };
0BC1CA72532579F9E2CCB620 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16163A4DE2078135E9435029 /* libPods.a */; };
133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13B07FBD1A68108700A75B9A /* LaunchScreen~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen~iphone.xib */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
DD1EC6B91B41DFDE002B4339 /* LaunchScreen~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = DD1EC6B81B41DFDE002B4339 /* LaunchScreen~ipad.xib */; };
DD7DC7501B3B357100E5D2FC /* RootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7DC74F1B3B357100E5D2FC /* RootViewController.swift */; };
DDB119C11B20C29300589B94 /* Akkurat-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = DDB119C01B20C29300589B94 /* Akkurat-Regular.otf */; };
DDE725231B02BD1700AA769D /* libRCTVideo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDE725221B02BD0900AA769D /* libRCTVideo.a */; };
@ -32,13 +32,6 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
remoteInfo = RCTWebSocketDebugger;
};
00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
@ -109,6 +102,13 @@
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
DD1EC6B61B41DE37002B4339 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DD1EC6B21B41DE36002B4339 /* RCTWebSocket.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
remoteInfo = RCTWebSocket;
};
DDE725211B02BD0900AA769D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DDE7251D1B02BD0900AA769D /* RCTVideo.xcodeproj */;
@ -119,7 +119,6 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocketDebugger.xcodeproj; path = "node_modules/react-native/Libraries/RCTWebSocketDebugger/RCTWebSocketDebugger.xcodeproj"; sourceTree = "<group>"; };
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = "<group>"; };
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
00C302AF1ABCB8E700DB3ED1 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = "<group>"; };
@ -131,7 +130,7 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* WLPNTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WLPNTests.m; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* WLPN.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WLPN.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = "Base.lproj/LaunchScreen~iphone.xib"; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = "<group>"; };
@ -141,9 +140,11 @@
40F8BDECA5F81ADA12E89DFE /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
DD1EC6B21B41DE36002B4339 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
DD1EC6B81B41DFDE002B4339 /* LaunchScreen~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "LaunchScreen~ipad.xib"; path = "iOS/LaunchScreen~ipad.xib"; sourceTree = "<group>"; };
DD3B4C341AFDC76C00BCD40D /* libPods-StreamingKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libPods-StreamingKit.a"; path = "Pods/../build/Debug-iphoneos/libPods-StreamingKit.a"; sourceTree = "<group>"; };
DD7DC74C1B3B29B000E5D2FC /* WLPN-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WLPN-Bridging-Header.h"; sourceTree = "<group>"; };
DD7DC74F1B3B357100E5D2FC /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootViewController.swift; sourceTree = "<group>"; };
DD7DC74F1B3B357100E5D2FC /* RootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RootViewController.swift; path = iOS/RootViewController.swift; sourceTree = "<group>"; };
DDB119C01B20C29300589B94 /* Akkurat-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Akkurat-Regular.otf"; path = "iOS/Resources/Akkurat-Regular.otf"; sourceTree = "<group>"; };
DDE7251D1B02BD0900AA769D /* RCTVideo.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVideo.xcodeproj; path = "node_modules/react-native-video/RCTVideo.xcodeproj"; sourceTree = "<group>"; };
DDE7252E1B02C17100AA769D /* turntable-loop-1920x500-h264-512kbps-h264.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; name = "turntable-loop-1920x500-h264-512kbps-h264.mp4"; path = "src/assets/videos/turntable-loop-1920x500-h264-512kbps-h264.mp4"; sourceTree = "<group>"; };
@ -168,7 +169,6 @@
files = (
DDE725231B02BD1700AA769D /* libRCTVideo.a in Frameworks */,
146834051AC3E58100842450 /* libReact.a in Frameworks */,
00481BE81AC0C86700671115 /* libRCTWebSocketDebugger.a in Frameworks */,
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
00C302E61ABCBA2D00DB3ED1 /* libRCTAdSupport.a in Frameworks */,
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
@ -184,14 +184,6 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
00481BDC1AC0C7FA00671115 /* Products */ = {
isa = PBXGroup;
children = (
00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */,
);
name = Products;
sourceTree = "<group>";
};
00C302A81ABCB8CE00DB3ED1 /* Products */ = {
isa = PBXGroup;
children = (
@ -265,8 +257,9 @@
DDF8C1BF1B012F240000C2B4 /* Constants.h */,
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
DD1EC6B81B41DFDE002B4339 /* LaunchScreen~ipad.xib */,
13B07FB11A68108700A75B9A /* LaunchScreen~iphone.xib */,
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
);
name = WLPN;
@ -309,6 +302,7 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
DD1EC6B21B41DE36002B4339 /* RCTWebSocket.xcodeproj */,
DDE7251D1B02BD0900AA769D /* RCTVideo.xcodeproj */,
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
@ -319,7 +313,6 @@
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
@ -336,12 +329,12 @@
isa = PBXGroup;
children = (
13B07FAE1A68108700A75B9A /* WLPN */,
DD7DC74C1B3B29B000E5D2FC /* WLPN-Bridging-Header.h */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
00E356EF1AD99517003FC87E /* WLPNTests */,
83CBBA001A601CBA00E9B192 /* Products */,
6F0606FA8C62EE74A598B2DE /* Pods */,
7BC1E3E98E014CD4DA009A1D /* Frameworks */,
DD7DC74C1B3B29B000E5D2FC /* WLPN-Bridging-Header.h */,
);
indentWidth = 2;
sourceTree = "<group>";
@ -356,6 +349,14 @@
name = Products;
sourceTree = "<group>";
};
DD1EC6B31B41DE36002B4339 /* Products */ = {
isa = PBXGroup;
children = (
DD1EC6B71B41DE37002B4339 /* libRCTWebSocket.a */,
);
name = Products;
sourceTree = "<group>";
};
DDB119951B20018E00589B94 /* Resources */ = {
isa = PBXGroup;
children = (
@ -497,8 +498,8 @@
ProjectRef = DDE7251D1B02BD0900AA769D /* RCTVideo.xcodeproj */;
},
{
ProductGroup = 00481BDC1AC0C7FA00671115 /* Products */;
ProjectRef = 00481BDB1AC0C7FA00671115 /* RCTWebSocketDebugger.xcodeproj */;
ProductGroup = DD1EC6B31B41DE36002B4339 /* Products */;
ProjectRef = DD1EC6B21B41DE36002B4339 /* RCTWebSocket.xcodeproj */;
},
{
ProductGroup = 146834001AC3E56700842450 /* Products */;
@ -514,13 +515,6 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
00481BE61AC0C7FA00671115 /* libRCTWebSocketDebugger.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTWebSocketDebugger.a;
remoteRef = 00481BE51AC0C7FA00671115 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -584,6 +578,13 @@
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
DD1EC6B71B41DE37002B4339 /* libRCTWebSocket.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libRCTWebSocket.a;
remoteRef = DD1EC6B61B41DE37002B4339 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
DDE725221B02BD0900AA769D /* libRCTVideo.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@ -608,7 +609,8 @@
008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */,
DDE7252F1B02C17100AA769D /* turntable-loop-1920x500-h264-512kbps-h264.mp4 in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
DD1EC6B91B41DFDE002B4339 /* LaunchScreen~ipad.xib in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen~iphone.xib in Resources */,
DDB119C11B20C29300589B94 /* Akkurat-Regular.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -679,12 +681,12 @@
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
13B07FB11A68108700A75B9A /* LaunchScreen~iphone.xib */ = {
isa = PBXVariantGroup;
children = (
13B07FB21A68108700A75B9A /* Base */,
);
name = LaunchScreen.xib;
name = "LaunchScreen~iphone.xib";
path = iOS;
sourceTree = "<group>";
};

iOS/Base.lproj/LaunchScreen.xib → iOS/Base.lproj/LaunchScreen~iphone.xib View File


+ 39
- 51
iOS/Classes/AudioManager.m View File

@ -19,6 +19,7 @@
- (AudioManager *)init
{
self = [super init];
audioPlayer = [[STKAudioPlayer alloc] initWithOptions:(STKAudioPlayerOptions){ .readBufferSize = LPN_AUDIO_BUFFER_SEC }];
[audioPlayer setDelegate:self];
[self setSharedAudioSessionCategory];
@ -33,23 +34,19 @@
}
#pragma mark - RCTBridgeModule
#pragma mark - Pubic API
RCT_EXPORT_MODULE();
RCT_EXPORT_METHOD(play)
{
if (!audioPlayer)
{
if (!audioPlayer) {
return;
}
if (audioPlayer.state == STKAudioPlayerStatePaused)
{
if (audioPlayer.state == STKAudioPlayerStatePaused) {
[audioPlayer resume];
}
else
{
} else {
[audioPlayer play:LPN_AUDIO_STREAM_URL];
}
@ -57,62 +54,46 @@ RCT_EXPORT_METHOD(play)
RCT_EXPORT_METHOD(pause)
{
if (!audioPlayer)
{
if (!audioPlayer) {
return;
}
else
{
} else {
[audioPlayer pause];
}
}
RCT_EXPORT_METHOD(resume)
{
if (!audioPlayer)
{
if (!audioPlayer) {
return;
}
else
{
} else {
[audioPlayer resume];
}
}
RCT_EXPORT_METHOD(stop)
{
if (!audioPlayer)
{
if (!audioPlayer) {
return;
}
else
{
} else {
[audioPlayer stop];
}
}
RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
{
if (!audioPlayer)
{
callback(@[[NSNull null], @{@"status" : @"ERROR"}]);
}
else if ([audioPlayer state] == STKAudioPlayerStatePlaying)
{
callback(@[[NSNull null], @{@"status" : @"PLAYING"}]);
}
else if ([audioPlayer state] == STKAudioPlayerStateBuffering)
{
callback(@[[NSNull null], @{@"status" : @"BUFFERING"}]);
}
else
{
callback(@[[NSNull null], @{@"status" : @"STOPPED"}]);
if (!audioPlayer) {
callback(@[[NSNull null], @{@"status": @"ERROR"}]);
} else if ([audioPlayer state] == STKAudioPlayerStatePlaying) {
callback(@[[NSNull null], @{@"status": @"PLAYING"}]);
} else if ([audioPlayer state] == STKAudioPlayerStateBuffering) {
callback(@[[NSNull null], @{@"status": @"BUFFERING"}]);
} else {
callback(@[[NSNull null], @{@"status": @"STOPPED"}]);
}
}
#pragma mark - STKAudioPlayer
#pragma mark - StreamingKit Audio Player
- (void)audioPlayer:(STKAudioPlayer *)player didStartPlayingQueueItemId:(NSObject *)queueItemId
@ -137,26 +118,30 @@ RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
- (void)audioPlayer:(STKAudioPlayer *)player stateChanged:(STKAudioPlayerState)state previousState:(STKAudioPlayerState)previousState
{
NSLog(@"AudioPlayer state has changed");
switch (state)
{
switch (state) {
case STKAudioPlayerStatePlaying:
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{@"status" : @"PLAYING"}];
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent"
body:@{@"status": @"PLAYING"}];
break;
case STKAudioPlayerStatePaused:
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{@"status" : @"PAUSED"}];
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent"
body:@{@"status": @"PAUSED"}];
break;
case STKAudioPlayerStateStopped:
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{@"status" : @"STOPPED"}];
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent"
body:@{@"status": @"STOPPED"}];
break;
case STKAudioPlayerStateBuffering:
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{@"status" : @"BUFFERING"}];
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent"
body:@{@"status": @"BUFFERING"}];
break;
case STKAudioPlayerStateError:
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent" body:@{@"status" : @"ERROR"}];
[self.bridge.eventDispatcher sendDeviceEventWithName:@"AudioBridgeEvent"
body:@{@"status": @"ERROR"}];
break;
default:
@ -165,7 +150,7 @@ RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
}
#pragma mark - AVAudioSession
#pragma mark - Audio Session Methods
- (void)setSharedAudioSessionCategory
@ -175,8 +160,7 @@ RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
// Create shared session and set audio session category allowing background playback
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&categoryError];
if (categoryError)
{
if (categoryError) {
NSLog(@"Error setting category! %@", [categoryError description]);
}
}
@ -197,8 +181,12 @@ RCT_EXPORT_METHOD(getStatus: (RCTResponseSenderBlock) callback)
- (void)unregisterAudioInterruptionNotifications
{
[[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionRouteChangeNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:AVAudioSessionRouteChangeNotification
object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:AVAudioSessionInterruptionNotification
object:nil];
}
- (void)onAudioInterruption:(NSNotification *)notification

+ 12
- 0
iOS/Images.xcassets/LaunchIpad.imageset/Contents.json View File

@ -0,0 +1,12 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LumpenAppScreen-03.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

BIN
iOS/Images.xcassets/LaunchIpad.imageset/LumpenAppScreen-03.pdf View File


iOS/Images.xcassets/Background.imageset/Contents.json → iOS/Images.xcassets/LaunchIphone.imageset/Contents.json View File


iOS/Images.xcassets/Background.imageset/LumpenAppScreen-375x667.pdf → iOS/Images.xcassets/LaunchIphone.imageset/LumpenAppScreen-375x667.pdf View File


+ 1
- 1
iOS/Info.plist View File

@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3</string>
<string>4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>

+ 30
- 0
iOS/LaunchScreen~ipad.xib View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LaunchIpad" translatesAutoresizingMaskIntoConstraints="NO" id="V2I-Y9-ewz">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="V2I-Y9-ewz" secondAttribute="centerX" id="I7h-jK-zfK"/>
<constraint firstAttribute="centerY" secondItem="V2I-Y9-ewz" secondAttribute="centerY" id="n4a-Xw-gxl"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="iPad"/>
<point key="canvasLocation" x="404" y="445"/>
</view>
</objects>
<resources>
<image name="LaunchIpad" width="768" height="1024"/>
</resources>
</document>

RootViewController.swift → iOS/RootViewController.swift View File


+ 765
- 329
npm-shrinkwrap.json
File diff suppressed because it is too large
View File


+ 4
- 4
package.json View File

@ -1,13 +1,13 @@
{
"name": "lumpen-fm",
"version": "0.0.1",
"name": "lumpen-radio",
"version": "1.0.0-rc.2",
"private": true,
"scripts": {
"start": "node webpack-watch & node_modules/react-native/packager/packager.sh"
},
"dependencies": {
"react-native": "^0.4.2",
"react-native-video": "^0.3.6",
"react-native": "^0.6.0",
"react-native-video": "^0.4.9",
"react-tween-state": "0.0.5",
"reflux": "^0.2.7"
},

BIN
screenshot.png View File

Before After
Width: 640  |  Height: 1136  |  Size: 318 KiB Width: 640  |  Height: 1136  |  Size: 242 KiB

+ 0
- 1
src/components/App.jsx View File

@ -7,7 +7,6 @@ import Messages from '../stores/messages';
import styles from '../styles';
import { AudioPlayer } from '../lib/audio';
import Video from 'react-native-video';
import ConnectionStatus from './ConnectionStatus'
import Background from './Background'

+ 5
- 2
src/styles.es6 View File

@ -6,7 +6,8 @@ export default StyleSheet.create({
appContainer: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
justifyContent: 'center',
backgroundColor: 'transparent'
},
appLogo: {
@ -23,6 +24,7 @@ export default StyleSheet.create({
appMessage: {
fontSize: 36,
color: 'white',
backgroundColor: 'transparent',
fontFamily: 'Avenir-Medium',
alignSelf: 'center',
padding: 5
@ -34,7 +36,8 @@ export default StyleSheet.create({
connectionMessage: {
backgroundColor: '#3b7ec1',
opacity: 0.7
opacity: 0.7,
padding: 5
},
backgroundVideo: {

+ 2
- 1
webpack-watch.js View File

@ -32,7 +32,8 @@ var depGraph = new DependencyGraph({
return filepath.indexOf('__tests__') !== -1 ||
blacklistRE.test(filepath);
},
fileWatcher: { on: function() {} }
fileWatcher: { on: function() {} },
assetExts: ['png', 'jpg']
});
depGraph._loading

Loading…
Cancel
Save