Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ashqal committed Jul 24, 2016
2 parents 4e0bd6c + 0d083e1 commit ca96377
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ pod 'MD360Player4iOS', '~> 1.0.0'
```

## Release Node
**1.1.1.beta**
* [Working-with-the-IJKPlayer-iOS-version](https://github.com/ashqal/MD360Player4iOS/wiki/Working-with-the-IJKPlayer-iOS-version)

**1.0.0**
* make the switch mode public. switchInteractiveMode:(MDModeInteractive)interactiveMode and switchDisplayMode:(MDModeDisplay)displayMode and switchProjectionMode:(MDModeProjection)projectionMode
* add dome support.
Expand Down Expand Up @@ -90,23 +93,12 @@ self.vrLibrary = [config build];

## Custom Director Factory
```objc
@interface VideoPlayerViewController ()<MD360DirectorFactory>

@interface CustomDirectorFactory : NSObject<MD360DirectorFactory>
@end

@implementation VideoPlayerViewController
...
- (void) initPlayer{
...
/////////////////////////////////////////////////////// MDVRLibrary
MDVRConfiguration* config = [MDVRLibrary createConfig];
...
[config setDirectorFactory:self]; // pass in the custom factory
...
self.vrLibrary = [config build];
/////////////////////////////////////////////////////// MDVRLibrary
}
@implementation CustomDirectorFactory

// implement the MD360DirectorFactory protocol here.
- (MD360Director*) createDirector:(int) index{
MD360Director* director = [[MD360Director alloc]init];
switch (index) {
Expand All @@ -119,7 +111,22 @@ self.vrLibrary = [config build];
}
return director;
}

@end

@implementation VideoPlayerViewController
...
- (void) initPlayer{
...
/////////////////////////////////////////////////////// MDVRLibrary
MDVRConfiguration* config = [MDVRLibrary createConfig];
...
[config [[CustomDirectorFactory alloc]init]]; // pass in the custom factory
...
self.vrLibrary = [config build];
/////////////////////////////////////////////////////// MDVRLibrary
}

@end

```
Expand Down

0 comments on commit ca96377

Please sign in to comment.