udgrate example to rn33 (#329)
This commit is contained in:
parent
4b8101398c
commit
7a1a0a82d0
6
Examples/VideoPlayer/.buckconfig
Normal file
6
Examples/VideoPlayer/.buckconfig
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
[android]
|
||||||
|
target = Google Inc.:Google APIs:23
|
||||||
|
|
||||||
|
[maven_repositories]
|
||||||
|
central = https://repo1.maven.org/maven2
|
@ -1,63 +1,28 @@
|
|||||||
[ignore]
|
[ignore]
|
||||||
|
|
||||||
# We fork some components by platform.
|
# We fork some components by platform.
|
||||||
.*/*.web.js
|
|
||||||
.*/*.android.js
|
.*/*.android.js
|
||||||
|
|
||||||
# Some modules have their own node_modules with overlap
|
# Ignore templates with `@flow` in header
|
||||||
.*/node_modules/node-haste/.*
|
.*/local-cli/generator.*
|
||||||
|
|
||||||
# Ugh
|
# Ignore malformed json
|
||||||
.*/node_modules/babel.*
|
|
||||||
.*/node_modules/babylon.*
|
|
||||||
.*/node_modules/invariant.*
|
|
||||||
|
|
||||||
# Ignore react and fbjs where there are overlaps, but don't ignore
|
|
||||||
# anything that react-native relies on
|
|
||||||
.*/node_modules/fbjs/lib/Map.js
|
|
||||||
.*/node_modules/fbjs/lib/fetch.js
|
|
||||||
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
|
|
||||||
.*/node_modules/fbjs/lib/ErrorUtils.js
|
|
||||||
|
|
||||||
# Flow has a built-in definition for the 'react' module which we prefer to use
|
|
||||||
# over the currently-untyped source
|
|
||||||
.*/node_modules/react/react.js
|
|
||||||
.*/node_modules/react/lib/React.js
|
|
||||||
.*/node_modules/react/lib/ReactDOM.js
|
|
||||||
|
|
||||||
.*/__mocks__/.*
|
|
||||||
.*/__tests__/.*
|
|
||||||
|
|
||||||
.*/commoner/test/source/widget/share.js
|
|
||||||
|
|
||||||
# Ignore commoner tests
|
|
||||||
.*/node_modules/commoner/test/.*
|
|
||||||
|
|
||||||
# See https://github.com/facebook/flow/issues/442
|
|
||||||
.*/react-tools/node_modules/commoner/lib/reader.js
|
|
||||||
|
|
||||||
# Ignore jest
|
|
||||||
.*/node_modules/jest-cli/.*
|
|
||||||
|
|
||||||
# Ignore Website
|
|
||||||
.*/website/.*
|
|
||||||
|
|
||||||
.*/node_modules/is-my-json-valid/test/.*\.json
|
|
||||||
.*/node_modules/iconv-lite/encodings/tables/.*\.json
|
|
||||||
.*/node_modules/y18n/test/.*\.json
|
.*/node_modules/y18n/test/.*\.json
|
||||||
.*/node_modules/spdx-license-ids/spdx-license-ids.json
|
|
||||||
.*/node_modules/spdx-exceptions/index.json
|
# Ignore the website subdir
|
||||||
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
|
<PROJECT_ROOT>/website/.*
|
||||||
.*/node_modules/resolve/lib/core.json
|
|
||||||
.*/node_modules/jsonparse/samplejson/.*\.json
|
# Ignore BUCK generated dirs
|
||||||
.*/node_modules/json5/test/.*\.json
|
<PROJECT_ROOT>/\.buckd/
|
||||||
.*/node_modules/ua-parser-js/test/.*\.json
|
|
||||||
.*/node_modules/builtin-modules/builtin-modules.json
|
# Ignore unexpected extra @providesModule
|
||||||
.*/node_modules/binary-extensions/binary-extensions.json
|
.*/node_modules/commoner/test/source/widget/share.js
|
||||||
.*/node_modules/url-regex/tlds.json
|
|
||||||
.*/node_modules/joi/.*\.json
|
# Ignore duplicate module providers
|
||||||
.*/node_modules/isemail/.*\.json
|
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
|
||||||
.*/node_modules/tr46/.*\.json
|
.*/Libraries/react-native/React.js
|
||||||
|
.*/Libraries/react-native/ReactNative.js
|
||||||
|
.*/node_modules/jest-runtime/build/__tests__/.*
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
|
|
||||||
@ -72,18 +37,22 @@ module.system=haste
|
|||||||
esproposal.class_static_fields=enable
|
esproposal.class_static_fields=enable
|
||||||
esproposal.class_instance_fields=enable
|
esproposal.class_instance_fields=enable
|
||||||
|
|
||||||
|
experimental.strict_type_args=true
|
||||||
|
|
||||||
munge_underscores=true
|
munge_underscores=true
|
||||||
|
|
||||||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
||||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\)$' -> 'RelativeImageStub'
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||||
|
|
||||||
suppress_type=$FlowIssue
|
suppress_type=$FlowIssue
|
||||||
suppress_type=$FlowFixMe
|
suppress_type=$FlowFixMe
|
||||||
suppress_type=$FixMe
|
suppress_type=$FixMe
|
||||||
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||||
|
|
||||||
|
unsafe.enable_getters_and_setters=true
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
0.22.0
|
^0.30.0
|
||||||
|
10
Examples/VideoPlayer/.gitignore
vendored
10
Examples/VideoPlayer/.gitignore
vendored
@ -1,6 +1,3 @@
|
|||||||
VideoPlayer.xcodeproj/project.xcworkspace/**/*
|
|
||||||
VideoPlayer.xcodeproj/xcuserdata/**/*
|
|
||||||
|
|
||||||
# OSX
|
# OSX
|
||||||
#
|
#
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@ -27,6 +24,7 @@ project.xcworkspace
|
|||||||
|
|
||||||
# Android/IJ
|
# Android/IJ
|
||||||
#
|
#
|
||||||
|
*.iml
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle
|
||||||
local.properties
|
local.properties
|
||||||
@ -35,3 +33,9 @@ local.properties
|
|||||||
#
|
#
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
# BUCK
|
||||||
|
buck-out/
|
||||||
|
\.buckd/
|
||||||
|
android/app/libs
|
||||||
|
android/keystores/debug.keystore
|
||||||
|
66
Examples/VideoPlayer/android/app/BUCK
Normal file
66
Examples/VideoPlayer/android/app/BUCK
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import re
|
||||||
|
|
||||||
|
# To learn about Buck see [Docs](https://buckbuild.com/).
|
||||||
|
# To run your application with Buck:
|
||||||
|
# - install Buck
|
||||||
|
# - `npm start` - to start the packager
|
||||||
|
# - `cd android`
|
||||||
|
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
|
||||||
|
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
|
||||||
|
# - `buck install -r android/app` - compile, install and run application
|
||||||
|
#
|
||||||
|
|
||||||
|
lib_deps = []
|
||||||
|
for jarfile in glob(['libs/*.jar']):
|
||||||
|
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
|
||||||
|
lib_deps.append(':' + name)
|
||||||
|
prebuilt_jar(
|
||||||
|
name = name,
|
||||||
|
binary_jar = jarfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
for aarfile in glob(['libs/*.aar']):
|
||||||
|
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
|
||||||
|
lib_deps.append(':' + name)
|
||||||
|
android_prebuilt_aar(
|
||||||
|
name = name,
|
||||||
|
aar = aarfile,
|
||||||
|
)
|
||||||
|
|
||||||
|
android_library(
|
||||||
|
name = 'all-libs',
|
||||||
|
exported_deps = lib_deps
|
||||||
|
)
|
||||||
|
|
||||||
|
android_library(
|
||||||
|
name = 'app-code',
|
||||||
|
srcs = glob([
|
||||||
|
'src/main/java/**/*.java',
|
||||||
|
]),
|
||||||
|
deps = [
|
||||||
|
':all-libs',
|
||||||
|
':build_config',
|
||||||
|
':res',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
android_build_config(
|
||||||
|
name = 'build_config',
|
||||||
|
package = 'com.videoplayer',
|
||||||
|
)
|
||||||
|
|
||||||
|
android_resource(
|
||||||
|
name = 'res',
|
||||||
|
res = 'src/main/res',
|
||||||
|
package = 'com.videoplayer',
|
||||||
|
)
|
||||||
|
|
||||||
|
android_binary(
|
||||||
|
name = 'app',
|
||||||
|
package_type = 'debug',
|
||||||
|
manifest = 'src/main/AndroidManifest.xml',
|
||||||
|
keystore = '//android/keystores:debug',
|
||||||
|
deps = [
|
||||||
|
':app-code',
|
||||||
|
],
|
||||||
|
)
|
@ -3,12 +3,13 @@ apply plugin: "com.android.application"
|
|||||||
import com.android.build.OutputFile
|
import com.android.build.OutputFile
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets.
|
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
||||||
|
* and bundleReleaseJsAndAssets).
|
||||||
* These basically call `react-native bundle` with the correct arguments during the Android build
|
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||||
* bundle directly from the development server. Below you can see all the possible configurations
|
* bundle directly from the development server. Below you can see all the possible configurations
|
||||||
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||||
* `apply from: "react.gradle"` line.
|
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||||
*
|
*
|
||||||
* project.ext.react = [
|
* project.ext.react = [
|
||||||
* // the name of the generated asset file containing your JS bundle
|
* // the name of the generated asset file containing your JS bundle
|
||||||
@ -23,6 +24,15 @@ import com.android.build.OutputFile
|
|||||||
* // whether to bundle JS and assets in release mode
|
* // whether to bundle JS and assets in release mode
|
||||||
* bundleInRelease: true,
|
* bundleInRelease: true,
|
||||||
*
|
*
|
||||||
|
* // whether to bundle JS and assets in another build variant (if configured).
|
||||||
|
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
||||||
|
* // The configuration property can be in the following formats
|
||||||
|
* // 'bundleIn${productFlavor}${buildType}'
|
||||||
|
* // 'bundleIn${buildType}'
|
||||||
|
* // bundleInFreeDebug: true,
|
||||||
|
* // bundleInPaidRelease: true,
|
||||||
|
* // bundleInBeta: true,
|
||||||
|
*
|
||||||
* // the root of your project, i.e. where "package.json" lives
|
* // the root of your project, i.e. where "package.json" lives
|
||||||
* root: "../../",
|
* root: "../../",
|
||||||
*
|
*
|
||||||
@ -45,15 +55,20 @@ import com.android.build.OutputFile
|
|||||||
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||||
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||||
* // for example, you might want to remove it from here.
|
* // for example, you might want to remove it from here.
|
||||||
* inputExcludes: ["android/**", "ios/**"]
|
* inputExcludes: ["android/**", "ios/**"],
|
||||||
|
*
|
||||||
|
* // override which node gets called and with what additional arguments
|
||||||
|
* nodeExecutableAndArgs: ["node"]
|
||||||
|
*
|
||||||
|
* // supply additional arguments to the packager
|
||||||
|
* extraPackagerArgs: []
|
||||||
* ]
|
* ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apply from: "react.gradle"
|
apply from: "../../node_modules/react-native/react.gradle"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this to true to create three separate APKs instead of one:
|
* Set this to true to create two separate APKs instead of one:
|
||||||
* - A universal APK that works on all devices
|
|
||||||
* - An APK that only works on ARM devices
|
* - An APK that only works on ARM devices
|
||||||
* - An APK that only works on x86 devices
|
* - An APK that only works on x86 devices
|
||||||
* The advantage is the size of the APK is reduced by about 4MB.
|
* The advantage is the size of the APK is reduced by about 4MB.
|
||||||
@ -83,9 +98,9 @@ android {
|
|||||||
}
|
}
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
|
||||||
universalApk true
|
|
||||||
reset()
|
reset()
|
||||||
|
enable enableSeparateBuildPerCPUArchitecture
|
||||||
|
universalApk false // If true, also generate a universal APK
|
||||||
include "armeabi-v7a", "x86"
|
include "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -114,5 +129,12 @@ dependencies {
|
|||||||
compile project(':react-native-video')
|
compile project(':react-native-video')
|
||||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||||
compile "com.android.support:appcompat-v7:23.0.1"
|
compile "com.android.support:appcompat-v7:23.0.1"
|
||||||
compile "com.facebook.react:react-native:0.20.+"
|
compile "com.facebook.react:react-native:+" // From node_modules
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run this once to be able to run the application with BUCK
|
||||||
|
// puts all compile dependencies into folder libs for BUCK to use
|
||||||
|
task copyDownloadableDepsToLibs(type: Copy) {
|
||||||
|
from configurations.compile
|
||||||
|
into 'libs'
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,14 @@
|
|||||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
# See http://sourceforge.net/p/proguard/bugs/466/
|
||||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
||||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
|
||||||
|
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
|
||||||
|
|
||||||
# Do not strip any method/class that is annotated with @DoNotStrip
|
# Do not strip any method/class that is annotated with @DoNotStrip
|
||||||
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
-keep @com.facebook.proguard.annotations.DoNotStrip class *
|
||||||
|
-keep @com.facebook.common.internal.DoNotStrip class *
|
||||||
-keepclassmembers class * {
|
-keepclassmembers class * {
|
||||||
@com.facebook.proguard.annotations.DoNotStrip *;
|
@com.facebook.proguard.annotations.DoNotStrip *;
|
||||||
|
@com.facebook.common.internal.DoNotStrip *;
|
||||||
}
|
}
|
||||||
|
|
||||||
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
|
||||||
@ -42,8 +45,8 @@
|
|||||||
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
||||||
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp <methods>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup <methods>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
||||||
|
|
||||||
-dontwarn com.facebook.react.**
|
-dontwarn com.facebook.react.**
|
||||||
|
|
||||||
@ -51,9 +54,9 @@
|
|||||||
|
|
||||||
-keepattributes Signature
|
-keepattributes Signature
|
||||||
-keepattributes *Annotation*
|
-keepattributes *Annotation*
|
||||||
-keep class com.squareup.okhttp.** { *; }
|
-keep class okhttp3.** { *; }
|
||||||
-keep interface com.squareup.okhttp.** { *; }
|
-keep interface okhttp3.** { *; }
|
||||||
-dontwarn com.squareup.okhttp.**
|
-dontwarn okhttp3.**
|
||||||
|
|
||||||
# okio
|
# okio
|
||||||
|
|
||||||
@ -61,7 +64,3 @@
|
|||||||
-dontwarn java.nio.file.*
|
-dontwarn java.nio.file.*
|
||||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||||
-dontwarn okio.**
|
-dontwarn okio.**
|
||||||
|
|
||||||
# stetho
|
|
||||||
|
|
||||||
-dontwarn com.facebook.stetho.**
|
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
package com.videoplayer;
|
package com.videoplayer;
|
||||||
|
|
||||||
import com.facebook.react.ReactActivity;
|
import com.facebook.react.ReactActivity;
|
||||||
import com.brentvatne.react.ReactVideoPackage;
|
|
||||||
import com.facebook.react.ReactPackage;
|
|
||||||
import com.facebook.react.shell.MainReactPackage;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class MainActivity extends ReactActivity {
|
public class MainActivity extends ReactActivity {
|
||||||
|
|
||||||
@ -18,24 +12,4 @@ public class MainActivity extends ReactActivity {
|
|||||||
protected String getMainComponentName() {
|
protected String getMainComponentName() {
|
||||||
return "VideoPlayer";
|
return "VideoPlayer";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns whether dev mode should be enabled.
|
|
||||||
* This enables e.g. the dev menu.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected boolean getUseDeveloperSupport() {
|
|
||||||
return BuildConfig.DEBUG;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of packages used by the app. If the app uses additional views
|
|
||||||
* or modules besides the default ones, add more packages here.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected List<ReactPackage> getPackages() {
|
|
||||||
return Arrays.<ReactPackage>asList(
|
|
||||||
new MainReactPackage(),
|
|
||||||
new ReactVideoPackage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.videoplayer;
|
||||||
|
|
||||||
|
import android.app.Application;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.facebook.react.ReactApplication;
|
||||||
|
import com.brentvatne.react.ReactVideoPackage;
|
||||||
|
import com.facebook.react.ReactInstanceManager;
|
||||||
|
import com.facebook.react.ReactNativeHost;
|
||||||
|
import com.facebook.react.ReactPackage;
|
||||||
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class MainApplication extends Application implements ReactApplication {
|
||||||
|
|
||||||
|
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||||
|
@Override
|
||||||
|
protected boolean getUseDeveloperSupport() {
|
||||||
|
return BuildConfig.DEBUG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<ReactPackage> getPackages() {
|
||||||
|
return Arrays.<ReactPackage>asList(
|
||||||
|
new MainReactPackage(),
|
||||||
|
new ReactVideoPackage()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReactNativeHost getReactNativeHost() {
|
||||||
|
return mReactNativeHost;
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string name="app_name">VideoPlayer</string>
|
<string name="app_name">VideoPlayer</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -16,5 +16,9 @@ allprojects {
|
|||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
jcenter()
|
jcenter()
|
||||||
|
maven {
|
||||||
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||||
|
url "$rootDir/../node_modules/react-native/android"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 46;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
|
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
|
||||||
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
|
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
|
||||||
@ -19,9 +20,11 @@
|
|||||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
|
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
|
||||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||||
|
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||||
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
|
||||||
|
73EBA007CB43496B88761499 /* libRCTVideo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ACEA01C041B04859A863CDF7 /* libRCTVideo.a */; };
|
||||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||||
F45119DCD4CB4566AA95CCBF /* libRCTVideo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E6D74A42E295462FBFFFB2F5 /* libRCTVideo.a */; };
|
AADC54DC1D8DACE0001FA2C8 /* broadchurch.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = AADC54DB1D8DACDB001FA2C8 /* broadchurch.mp4 */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -102,20 +105,27 @@
|
|||||||
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
||||||
remoteInfo = RCTText;
|
remoteInfo = RCTText;
|
||||||
};
|
};
|
||||||
|
AADC54D61D8DA874001FA2C8 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = BE547F7569324FAB895823C9 /* RCTVideo.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||||
|
remoteInfo = RCTVideo;
|
||||||
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = main.jsbundle; sourceTree = "<group>"; };
|
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 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>"; };
|
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = "<group>"; };
|
||||||
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = ../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj; sourceTree = "<group>"; };
|
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = "<group>"; };
|
||||||
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = ../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj; sourceTree = "<group>"; };
|
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = "<group>"; };
|
||||||
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = ../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj; sourceTree = "<group>"; };
|
00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = "<group>"; };
|
||||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = ../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj; sourceTree = "<group>"; };
|
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
|
||||||
00E356EE1AD99517003FC87E /* VideoPlayerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VideoPlayerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
00E356EE1AD99517003FC87E /* VideoPlayerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VideoPlayerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
00E356F21AD99517003FC87E /* VideoPlayerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoPlayerTests.m; sourceTree = "<group>"; };
|
00E356F21AD99517003FC87E /* VideoPlayerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoPlayerTests.m; sourceTree = "<group>"; };
|
||||||
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj; sourceTree = "<group>"; };
|
139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
|
||||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = ../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj; sourceTree = "<group>"; };
|
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
|
||||||
13B07F961A680F5B00A75B9A /* VideoPlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoPlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
13B07F961A680F5B00A75B9A /* VideoPlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoPlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = VideoPlayer/AppDelegate.h; sourceTree = "<group>"; };
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = VideoPlayer/AppDelegate.h; sourceTree = "<group>"; };
|
||||||
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = VideoPlayer/AppDelegate.m; sourceTree = "<group>"; };
|
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = VideoPlayer/AppDelegate.m; sourceTree = "<group>"; };
|
||||||
@ -123,11 +133,12 @@
|
|||||||
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VideoPlayer/Images.xcassets; sourceTree = "<group>"; };
|
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VideoPlayer/Images.xcassets; sourceTree = "<group>"; };
|
||||||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VideoPlayer/Info.plist; sourceTree = "<group>"; };
|
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VideoPlayer/Info.plist; sourceTree = "<group>"; };
|
||||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VideoPlayer/main.m; sourceTree = "<group>"; };
|
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VideoPlayer/main.m; sourceTree = "<group>"; };
|
||||||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../node_modules/react-native/React/React.xcodeproj; sourceTree = "<group>"; };
|
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; 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>"; };
|
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>"; };
|
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||||
1AAB246A2EAD48DC803233C0 /* RCTVideo.xcodeproj */ = {isa = PBXFileReference; name = "RCTVideo.xcodeproj"; path = "../node_modules/react-native-video/RCTVideo.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
AADC54DB1D8DACDB001FA2C8 /* broadchurch.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = broadchurch.mp4; sourceTree = "<group>"; };
|
||||||
E6D74A42E295462FBFFFB2F5 /* libRCTVideo.a */ = {isa = PBXFileReference; name = "libRCTVideo.a"; path = "libRCTVideo.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
ACEA01C041B04859A863CDF7 /* libRCTVideo.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTVideo.a; sourceTree = "<group>"; };
|
||||||
|
BE547F7569324FAB895823C9 /* RCTVideo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTVideo.xcodeproj; path = "../node_modules/react-native-video/RCTVideo.xcodeproj"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -135,6 +146,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -152,7 +164,7 @@
|
|||||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
||||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
||||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||||
F45119DCD4CB4566AA95CCBF /* libRCTVideo.a in Frameworks */,
|
73EBA007CB43496B88761499 /* libRCTVideo.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -235,6 +247,7 @@
|
|||||||
13B07FAE1A68108700A75B9A /* VideoPlayer */ = {
|
13B07FAE1A68108700A75B9A /* VideoPlayer */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
AADC54DB1D8DACDB001FA2C8 /* broadchurch.mp4 */,
|
||||||
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
||||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||||
13B07FB01A68108700A75B9A /* AppDelegate.m */,
|
13B07FB01A68108700A75B9A /* AppDelegate.m */,
|
||||||
@ -275,7 +288,7 @@
|
|||||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
||||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
||||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
||||||
1AAB246A2EAD48DC803233C0 /* RCTVideo.xcodeproj */,
|
BE547F7569324FAB895823C9 /* RCTVideo.xcodeproj */,
|
||||||
);
|
);
|
||||||
name = Libraries;
|
name = Libraries;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -309,6 +322,14 @@
|
|||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
AADC54CB1D8DA874001FA2C8 /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
AADC54D71D8DA874001FA2C8 /* libRCTVideo.a */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
@ -407,6 +428,10 @@
|
|||||||
ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
|
ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
|
||||||
ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
|
ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ProductGroup = AADC54CB1D8DA874001FA2C8 /* Products */;
|
||||||
|
ProjectRef = BE547F7569324FAB895823C9 /* RCTVideo.xcodeproj */;
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
|
ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
|
||||||
ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
|
ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
|
||||||
@ -495,6 +520,13 @@
|
|||||||
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
|
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
|
||||||
sourceTree = BUILT_PRODUCTS_DIR;
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
};
|
};
|
||||||
|
AADC54D71D8DA874001FA2C8 /* libRCTVideo.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = libRCTVideo.a;
|
||||||
|
remoteRef = AADC54D61D8DA874001FA2C8 /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
/* End PBXReferenceProxy section */
|
/* End PBXReferenceProxy section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
@ -509,6 +541,7 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
AADC54DC1D8DACE0001FA2C8 /* broadchurch.mp4 in Resources */,
|
||||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||||
);
|
);
|
||||||
@ -530,7 +563,6 @@
|
|||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
|
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
|
||||||
showEnvVarsInLog = 1;
|
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
@ -579,10 +611,6 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
|
||||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -590,12 +618,12 @@
|
|||||||
INFOPLIST_FILE = VideoPlayerTests/Info.plist;
|
INFOPLIST_FILE = VideoPlayerTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoPlayer.app/VideoPlayer";
|
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||||
);
|
);
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoPlayer.app/VideoPlayer";
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -604,19 +632,15 @@
|
|||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
|
||||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
INFOPLIST_FILE = VideoPlayerTests/Info.plist;
|
INFOPLIST_FILE = VideoPlayerTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 8.2;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoPlayer.app/VideoPlayer";
|
|
||||||
LIBRARY_SEARCH_PATHS = (
|
LIBRARY_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
"\"$(SRCROOT)/$(TARGET_NAME)\"",
|
||||||
);
|
);
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoPlayer.app/VideoPlayer";
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -631,9 +655,13 @@
|
|||||||
"$(SRCROOT)/../node_modules/react-native/React/**",
|
"$(SRCROOT)/../node_modules/react-native/React/**",
|
||||||
"$(SRCROOT)/../node_modules/react-native-video",
|
"$(SRCROOT)/../node_modules/react-native-video",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "VideoPlayer/Info.plist";
|
INFOPLIST_FILE = VideoPlayer/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-ObjC",
|
||||||
|
"-lc++",
|
||||||
|
);
|
||||||
PRODUCT_NAME = VideoPlayer;
|
PRODUCT_NAME = VideoPlayer;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
@ -648,9 +676,13 @@
|
|||||||
"$(SRCROOT)/../node_modules/react-native/React/**",
|
"$(SRCROOT)/../node_modules/react-native/React/**",
|
||||||
"$(SRCROOT)/../node_modules/react-native-video",
|
"$(SRCROOT)/../node_modules/react-native-video",
|
||||||
);
|
);
|
||||||
INFOPLIST_FILE = "VideoPlayer/Info.plist";
|
INFOPLIST_FILE = VideoPlayer/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||||
OTHER_LDFLAGS = "-ObjC";
|
OTHER_LDFLAGS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"-ObjC",
|
||||||
|
"-lc++",
|
||||||
|
);
|
||||||
PRODUCT_NAME = VideoPlayer;
|
PRODUCT_NAME = VideoPlayer;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
|
|
||||||
|
#import "RCTBundleURLProvider.h"
|
||||||
#import "RCTRootView.h"
|
#import "RCTRootView.h"
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
@ -17,36 +18,13 @@
|
|||||||
{
|
{
|
||||||
NSURL *jsCodeLocation;
|
NSURL *jsCodeLocation;
|
||||||
|
|
||||||
/**
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
|
||||||
* Loading JavaScript code - uncomment the one you want.
|
|
||||||
*
|
|
||||||
* OPTION 1
|
|
||||||
* Load from development server. Start the server from the repository root:
|
|
||||||
*
|
|
||||||
* $ npm start
|
|
||||||
*
|
|
||||||
* To run on device, change `localhost` to the IP address of your computer
|
|
||||||
* (you can get this by typing `ifconfig` into the terminal and selecting the
|
|
||||||
* `inet` value under `en0:`) and make sure your computer and iOS device are
|
|
||||||
* on the same Wi-Fi network.
|
|
||||||
*/
|
|
||||||
|
|
||||||
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OPTION 2
|
|
||||||
* Load from pre-bundled file on disk. The static bundle is automatically
|
|
||||||
* generated by the "Bundle React Native code and images" build step when
|
|
||||||
* running the project on an actual device or running the project on the
|
|
||||||
* simulator in the "Release" build configuration.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
||||||
|
|
||||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||||
moduleName:@"VideoPlayer"
|
moduleName:@"VideoPlayer"
|
||||||
initialProperties:nil
|
initialProperties:nil
|
||||||
launchOptions:launchOptions];
|
launchOptions:launchOptions];
|
||||||
|
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||||
|
|
||||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||||
UIViewController *rootViewController = [UIViewController new];
|
UIViewController *rootViewController = [UIViewController new];
|
||||||
|
@ -39,10 +39,16 @@
|
|||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
|
||||||
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
|
||||||
<key>NSAllowsArbitraryLoads</key>
|
<dict>
|
||||||
|
<key>NSExceptionDomains</key>
|
||||||
|
<dict>
|
||||||
|
<key>localhost</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#import "RCTLog.h"
|
#import "RCTLog.h"
|
||||||
#import "RCTRootView.h"
|
#import "RCTRootView.h"
|
||||||
|
|
||||||
#define TIMEOUT_SECONDS 240
|
#define TIMEOUT_SECONDS 600
|
||||||
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
||||||
|
|
||||||
@interface VideoPlayerTests : XCTestCase
|
@interface VideoPlayerTests : XCTestCase
|
||||||
|
BIN
Examples/VideoPlayer/iOS/broadchurch.mp4
Normal file
BIN
Examples/VideoPlayer/iOS/broadchurch.mp4
Normal file
Binary file not shown.
@ -6,8 +6,8 @@
|
|||||||
"start": "node_modules/react-native/packager/packager.sh"
|
"start": "node_modules/react-native/packager/packager.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^0.14.8",
|
"react": "15.3.1",
|
||||||
"react-native": "0.23.0",
|
"react-native": "^0.33.0",
|
||||||
"react-native-video": "../../"
|
"react-native-video": "../../"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,8 +82,8 @@ public class ReactVideoViewManager extends SimpleViewManager<ReactVideoView> {
|
|||||||
videoView.setSrc(
|
videoView.setSrc(
|
||||||
src.getString(PROP_SRC_URI),
|
src.getString(PROP_SRC_URI),
|
||||||
src.getString(PROP_SRC_TYPE),
|
src.getString(PROP_SRC_TYPE),
|
||||||
src.getBoolean(PROP_SRC_IS_NETWORK),,
|
src.getBoolean(PROP_SRC_IS_NETWORK),
|
||||||
src.getBoolean(PROP_SRC_IS_ASSET)
|
src.getBoolean(PROP_SRC_IS_ASSET),
|
||||||
mainVer,
|
mainVer,
|
||||||
patchVer
|
patchVer
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user