diff --git a/README.md b/README.md
index e473a766..597b71ec 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,30 @@ If you would like to allow other apps to play music over your video component, a
```
Note: you can also use the `ignoreSilentSwitch` prop, shown below.
+#### tvOS
+
+Run `react-native link` to link the react-native-video library.
+
+`react-native link` don’t works properly with the tvOS target so we need to add the library manually.
+
+First select your project in Xcode.
+
+
+
+After that, select the tvOS target of your application and select « General » tab
+
+
+
+Scroll to « Linked Frameworks and Libraries » and tap on the + button
+
+
+
+Select RCTVideo-tvOS
+
+
+
+That’s all, you can use react-native-video for your tvOS application
+
#### Android
Run `react-native link` to link the react-native-video library.
diff --git a/docs/tvOS-step-1.jpg b/docs/tvOS-step-1.jpg
new file mode 100644
index 00000000..742304d6
Binary files /dev/null and b/docs/tvOS-step-1.jpg differ
diff --git a/docs/tvOS-step-2.jpg b/docs/tvOS-step-2.jpg
new file mode 100644
index 00000000..3e955050
Binary files /dev/null and b/docs/tvOS-step-2.jpg differ
diff --git a/docs/tvOS-step-3.jpg b/docs/tvOS-step-3.jpg
new file mode 100644
index 00000000..395cd379
Binary files /dev/null and b/docs/tvOS-step-3.jpg differ
diff --git a/docs/tvOS-step-4.jpg b/docs/tvOS-step-4.jpg
new file mode 100644
index 00000000..c709618b
Binary files /dev/null and b/docs/tvOS-step-4.jpg differ
diff --git a/ios/RCTVideo.xcodeproj/project.pbxproj b/ios/RCTVideo.xcodeproj/project.pbxproj
index 120caff6..a2525e94 100644
--- a/ios/RCTVideo.xcodeproj/project.pbxproj
+++ b/ios/RCTVideo.xcodeproj/project.pbxproj
@@ -9,6 +9,10 @@
/* Begin PBXBuildFile section */
31CAFB211CADA8CD009BCF6F /* UIView+FindUIViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CAFB201CADA8CD009BCF6F /* UIView+FindUIViewController.m */; };
31CAFB2F1CADC77F009BCF6F /* RCTVideoPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CAFB2E1CADC77F009BCF6F /* RCTVideoPlayerViewController.m */; };
+ 641E284D1F0EECF100443AF6 /* RCTVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = BBD49E3A1AC8DEF000610F8E /* RCTVideo.m */; };
+ 641E284E1F0EECF100443AF6 /* RCTVideoPlayerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CAFB2E1CADC77F009BCF6F /* RCTVideoPlayerViewController.m */; };
+ 641E284F1F0EECF100443AF6 /* RCTVideoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BBD49E3C1AC8DEF000610F8E /* RCTVideoManager.m */; };
+ 641E28501F0EECF100443AF6 /* UIView+FindUIViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 31CAFB201CADA8CD009BCF6F /* UIView+FindUIViewController.m */; };
BBD49E3F1AC8DEF000610F8E /* RCTVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = BBD49E3A1AC8DEF000610F8E /* RCTVideo.m */; };
BBD49E401AC8DEF000610F8E /* RCTVideoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BBD49E3C1AC8DEF000610F8E /* RCTVideoManager.m */; };
/* End PBXBuildFile section */
@@ -23,6 +27,15 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 641E28421F0EEC8500443AF6 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "include/$(PRODUCT_NAME)";
+ dstSubfolderSpec = 16;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
@@ -32,6 +45,7 @@
31CAFB2D1CADC77F009BCF6F /* RCTVideoPlayerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTVideoPlayerViewController.h; sourceTree = ""; };
31CAFB2E1CADC77F009BCF6F /* RCTVideoPlayerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTVideoPlayerViewController.m; sourceTree = ""; };
31CAFB301CAE6B5F009BCF6F /* RCTVideoPlayerViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTVideoPlayerViewControllerDelegate.h; sourceTree = ""; };
+ 641E28441F0EEC8500443AF6 /* libRCTVideo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTVideo.a; sourceTree = BUILT_PRODUCTS_DIR; };
BBD49E391AC8DEF000610F8E /* RCTVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTVideo.h; sourceTree = ""; };
BBD49E3A1AC8DEF000610F8E /* RCTVideo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTVideo.m; sourceTree = ""; };
BBD49E3B1AC8DEF000610F8E /* RCTVideoManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTVideoManager.h; sourceTree = ""; };
@@ -46,6 +60,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 641E28411F0EEC8500443AF6 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -70,6 +91,7 @@
31CAFB1F1CADA8CD009BCF6F /* UIView+FindUIViewController.h */,
31CAFB201CADA8CD009BCF6F /* UIView+FindUIViewController.m */,
134814211AA4EA7D00B7C361 /* Products */,
+ 641E28441F0EEC8500443AF6 /* libRCTVideo.a */,
);
sourceTree = "";
};
@@ -93,6 +115,23 @@
productReference = 134814201AA4EA6300B7C361 /* libRCTVideo.a */;
productType = "com.apple.product-type.library.static";
};
+ 641E28431F0EEC8500443AF6 /* RCTVideo-tvOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 641E284C1F0EEC8500443AF6 /* Build configuration list for PBXNativeTarget "RCTVideo-tvOS" */;
+ buildPhases = (
+ 641E28401F0EEC8500443AF6 /* Sources */,
+ 641E28411F0EEC8500443AF6 /* Frameworks */,
+ 641E28421F0EEC8500443AF6 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "RCTVideo-tvOS";
+ productName = "RCTVideo-tvOS";
+ productReference = 641E28441F0EEC8500443AF6 /* libRCTVideo.a */;
+ productType = "com.apple.product-type.library.static";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -105,6 +144,10 @@
58B511DA1A9E6C8500147676 = {
CreatedOnToolsVersion = 6.1.1;
};
+ 641E28431F0EEC8500443AF6 = {
+ CreatedOnToolsVersion = 8.3.3;
+ ProvisioningStyle = Automatic;
+ };
};
};
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RCTVideo" */;
@@ -120,6 +163,7 @@
projectRoot = "";
targets = (
58B511DA1A9E6C8500147676 /* RCTVideo */,
+ 641E28431F0EEC8500443AF6 /* RCTVideo-tvOS */,
);
};
/* End PBXProject section */
@@ -136,6 +180,17 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 641E28401F0EEC8500443AF6 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 641E284D1F0EECF100443AF6 /* RCTVideo.m in Sources */,
+ 641E284E1F0EECF100443AF6 /* RCTVideoPlayerViewController.m in Sources */,
+ 641E284F1F0EECF100443AF6 /* RCTVideoManager.m in Sources */,
+ 641E28501F0EECF100443AF6 /* UIView+FindUIViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
@@ -242,6 +297,43 @@
};
name = Release;
};
+ 641E284A1F0EEC8500443AF6 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ GCC_NO_COMMON_BLOCKS = YES;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = RCTVideo;
+ SDKROOT = appletvos;
+ SKIP_INSTALL = YES;
+ TVOS_DEPLOYMENT_TARGET = 10.2;
+ };
+ name = Debug;
+ };
+ 641E284B1F0EEC8500443AF6 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_NO_COMMON_BLOCKS = YES;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = RCTVideo;
+ SDKROOT = appletvos;
+ SKIP_INSTALL = YES;
+ TVOS_DEPLOYMENT_TARGET = 10.2;
+ };
+ name = Release;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -263,6 +355,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 641E284C1F0EEC8500443AF6 /* Build configuration list for PBXNativeTarget "RCTVideo-tvOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 641E284A1F0EEC8500443AF6 /* Debug */,
+ 641E284B1F0EEC8500443AF6 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
/* End XCConfigurationList section */
};
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
diff --git a/react-native-video.podspec b/react-native-video.podspec
index c8d03443..5edb6569 100644
--- a/react-native-video.podspec
+++ b/react-native-video.podspec
@@ -11,7 +11,9 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/brentvatne/react-native-video"
s.license = "MIT"
- s.platform = :ios, "7.0"
+
+ s.ios.deployment_target = "7.0"
+ s.tvos.deployment_target = "9.0"
s.source = { :git => "https://github.com/brentvatne/react-native-video.git", :tag => "#{s.version}" }