Skip to content

A Simple Wrapper for the Kaboore 360/Cardboard Video Player

License

Notifications You must be signed in to change notification settings

yanglhan/VR360PlayerView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Native 360 Player for iOS


Note

This library can be used in Objedtive-C and Swift 2+.

Install

You must first download the trial version or the full version of the Kaboore 360 Player on Kaboore's official site.

You need to include the framework in your project and Apple's SceneKit framework.

#import <SceneKit/SceneKit.h>
#import <KabooreMedia/KabooreMedia.h>

Note that you have to add the kaboore framework to the "Embedded Binaries" section in your project.

Loading the player

You have 2 choices as of now. Cardboard or Touch. You have 2 init methods, 1 for each type.

Objective-C

player          = [[FW360PlayerViewController alloc] initWithCardboard:url withLicense:@"TEST000000000000000000000000000000000000"];
player.delegate = self;
[self presentViewController:player animated:YES completion:nil];

Swift

player          = FW360PlayerViewController(cardboard: url, license: "TEST000000000000000000000000000000000000");
player.delegate = self;
self.presentViewController(player, animated: YES, completion: nil);

The player should load and start playing

For TouchPlayer:

Objective-C

player          = [[FW360PlayerViewController alloc] initWithTouch:url withLicense:@"TEST000000000000000000000000000000000000"];
player.delegate = self;
[self presentViewController:player animated:YES completion:nil];

Swift

player          = FW360PlayerViewController(touch: url, license: "TEST000000000000000000000000000000000000");
player.delegate = self;
self.presentViewController(player, animated: YES, completion: nil);

To work properly, you view controller needs to implement the FW360PlayerDelegate protocol. There is 2 optional methods called FWPlayerDidAppear and FWPlayerDidDisappear that you can use to perform tasks after the view appeared and after it disappeared.

You have access to play and pause for the player. You can also seek programatically with seekToTime and you can set the speed of the touch controls and fields of view (Fov) with setToucheControlSpeed and setFieldOfView.

You also have access to the following properties: duration, isPlaying and playerView.

Video Rotation

To change the video rotation, you use the initialRotation property, it requires the angle in degrees. (affects the X axis only)

player.initialRotation = 180;

About

A Simple Wrapper for the Kaboore 360/Cardboard Video Player

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%