This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "MediaController.h" | |
#import "AppDelegate.h" | |
@implementation MediaController | |
RCT_EXPORT_MODULE(); | |
@synthesize bridge = _bridge; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react-native'); | |
var MediaController = require('NativeModules').MediaController; | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
TouchableHighlight, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) mediaPicker:(MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection { | |
MPMediaItem *mediaItem = mediaItemCollection.items[0]; | |
NSURL *assetURL = [mediaItem valueForProperty:MPMediaItemPropertyAssetURL]; | |
[self.bridge.eventDispatcher sendAppEventWithName:@"SongPlaying" body:[mediaItem valueForProperty:MPMediaItemPropertyTitle]]; | |
//... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void)showMediaPicker { | |
if(self.mediaPicker == nil) { | |
self.mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeAnyAudio]; | |
[self.mediaPicker setDelegate:self]; | |
[self.mediaPicker setAllowsPickingMultipleItems:NO]; | |
[self.mediaPicker setShowsCloudItems:NO]; | |
self.mediaPicker.prompt = @"Select song"; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import "RCTBridge.h" | |
#import "RCTEventDispatcher.h" | |
#import <MediaPlayer/MediaPlayer.h> | |
@import AVFoundation; | |
@interface MediaController : NSObject<RCTBridgeModule,MPMediaPickerControllerDelegate, AVAudioPlayerDelegate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation | |
moduleName:@"MCDJ" | |
initialProperties:nil | |
launchOptions:launchOptions]; | |
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | |
UIViewController *rootViewController = [[UIViewController alloc] init]; | |
rootViewController.view = rootView; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
@property (nonatomic, strong) UIWindow *window; | |
@property (nonatomic, strong) UIViewController *rootViewController; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.gainNode = this.ac.createGainNode(); | |
this.lowEQ = this.ac.createBiquadFilter(); | |
this.midEQ = this.ac.createBiquadFilter(); | |
this.highEQ = this.ac.createBiquadFilter(); | |
this.lowEQ.type = 3; | |
this.midEQ.type = 5; | |
this.highEQ.type = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resultDescription":"Menu result", | |
"statusCode":0, | |
"layoutRoot":{ | |
"id":"aef6bfeb-009d-4879-a892-9626c534c8f0", | |
"root":{ | |
"id":"afbed326-7177-4d6e-a293-d289318012a8", | |
"storyboardId":"73ffd717-5492-4e46-b397-7556957f25e5_aef6bfeb-009d-4879-a892-9626c534c8f0_afbed326-7177-4d6e-a293-d289318012a8", | |
"elems":[ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Joris Voorn - Untitled DUB Vol 1 | |
2) Acumen vs Timid Boy - Chicago Story (Oxia reinterpretation mix) (5:40) | |
3) Christian Smith - NYC (11:40) | |
4) Depeche Mode - Behind the Wheel (Aril Brikha Edit) (17:20) | |
5) Markus Mehta, Alec Chizhik - Chaos Theory (Rino Cerrone remix) (25:00) | |
6) Cirez D - The Tumble (Original Mix) (29:00) | |
7) Fedde le Grand & Nicky Romero - Slacking (35:00) | |
8) Wolfgang Gartner vs Axwell - I Found Illmerica (Tom Buster Bootleg) (39:00) | |
9) Hard Rock Sofa & St. Brothers - Blow Up (Original Mix) (45:00) | |
10) Michael Woods - Bullet (Original Mix) (50:00) |