From 105f4d4cebb745bb388dcbf288741ffbf05bf6ad Mon Sep 17 00:00:00 2001 From: Ovidiu Cristescu <55203625+LunatiqueCoder@users.noreply.github.com> Date: Wed, 31 Jul 2024 22:58:59 +0300 Subject: [PATCH] Expo app tv example (#112) * expo-app-tv-example --- .gitignore | 7 + CONTRIBUTING.md | 11 + README.md | 13 +- examples/MyTVProject/.gitignore | 22 + examples/MyTVProject/README.md | 48 + examples/MyTVProject/app.json | 45 + examples/MyTVProject/app/(tabs)/_layout.tsx | 83 + examples/MyTVProject/app/(tabs)/explore.tsx | 138 + examples/MyTVProject/app/(tabs)/index.tsx | 82 + examples/MyTVProject/app/(tabs)/tv_focus.tsx | 72 + examples/MyTVProject/app/+html.tsx | 42 + examples/MyTVProject/app/+not-found.tsx | 32 + examples/MyTVProject/app/_layout.tsx | 39 + .../assets/fonts/SpaceMono-Regular.ttf | Bin 0 -> 93252 bytes .../assets/images/adaptive-icon.png | Bin 0 -> 17547 bytes .../MyTVProject/assets/images/favicon.png | Bin 0 -> 1466 bytes examples/MyTVProject/assets/images/icon.png | Bin 0 -> 22380 bytes .../assets/images/partial-react-logo.png | Bin 0 -> 5075 bytes .../MyTVProject/assets/images/react-logo.png | Bin 0 -> 6341 bytes .../assets/images/react-logo@2x.png | Bin 0 -> 14225 bytes .../assets/images/react-logo@3x.png | Bin 0 -> 21252 bytes examples/MyTVProject/assets/images/splash.png | Bin 0 -> 47346 bytes .../assets/tv_icons/icon-1280x768.png | Bin 0 -> 73082 bytes .../assets/tv_icons/icon-1920x720.png | Bin 0 -> 87969 bytes .../assets/tv_icons/icon-2320x720.png | Bin 0 -> 96001 bytes .../assets/tv_icons/icon-3840x1440.png | Bin 0 -> 230135 bytes .../assets/tv_icons/icon-400x240.png | Bin 0 -> 19447 bytes .../assets/tv_icons/icon-4640x1440.png | Bin 0 -> 275789 bytes .../assets/tv_icons/icon-800x480.png | Bin 0 -> 43557 bytes .../MyTVProject/components/Collapsible.tsx | 44 + .../components/EventHandlingDemo.tsx | 242 + .../MyTVProject/components/ExternalLink.tsx | 24 + .../components/ExternalLink.tv.tsx | 20 + examples/MyTVProject/components/HelloWave.tsx | 40 + .../components/ParallaxScrollView.tsx | 86 + .../MyTVProject/components/ThemedText.tsx | 36 + .../MyTVProject/components/ThemedView.tsx | 22 + .../components/__tests__/ThemedText-test.tsx | 12 + .../__snapshots__/ThemedText-test.tsx.snap | 24 + .../components/navigation/TabBarIcon.tsx | 12 + examples/MyTVProject/constants/Colors.ts | 28 + examples/MyTVProject/constants/TextStyles.ts | 39 + examples/MyTVProject/eas.json | 53 + examples/MyTVProject/hooks/useColorScheme.ts | 1 + .../MyTVProject/hooks/useColorScheme.web.ts | 8 + examples/MyTVProject/hooks/useScale.ts | 6 + examples/MyTVProject/hooks/useScale.web.ts | 3 + examples/MyTVProject/hooks/useTextStyles.ts | 9 + examples/MyTVProject/hooks/useThemeColor.ts | 22 + examples/MyTVProject/metro.config.js | 39 + examples/MyTVProject/package.json | 68 + examples/MyTVProject/tsconfig.json | 17 + examples/VanillaVideoplayer/.bundle/config | 2 - examples/VanillaVideoplayer/.eslintrc.js | 4 - examples/VanillaVideoplayer/.gitignore | 66 - examples/VanillaVideoplayer/.prettierrc.js | 7 - examples/VanillaVideoplayer/.watchmanconfig | 1 - examples/VanillaVideoplayer/App.tsx | 25 - examples/VanillaVideoplayer/Gemfile | 6 - examples/VanillaVideoplayer/README.md | 89 - .../VanillaVideoplayer/__tests__/App.test.tsx | 17 - .../android/app/build.gradle | 123 - .../android/app/debug.keystore | Bin 2257 -> 0 bytes .../android/app/proguard-rules.pro | 10 - .../android/app/src/debug/AndroidManifest.xml | 13 - .../ReactNativeFlipper.java | 75 - .../android/app/src/main/AndroidManifest.xml | 25 - .../com/vanillavideoplayer/MainActivity.java | 32 - .../vanillavideoplayer/MainApplication.java | 62 - .../res/drawable/rn_edit_text_material.xml | 36 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3056 -> 0 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 5024 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2096 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 2858 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4569 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 7098 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 6464 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 10676 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 9250 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 15523 -> 0 bytes .../app/src/main/res/values/strings.xml | 3 - .../app/src/main/res/values/styles.xml | 9 - .../ReactNativeFlipper.java | 20 - .../VanillaVideoplayer/android/build.gradle | 21 - .../android/gradle.properties | 35 - .../android/gradle/wrapper/gradle-wrapper.jar | Bin 61574 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - examples/VanillaVideoplayer/android/gradlew | 244 - .../VanillaVideoplayer/android/gradlew.bat | 92 - .../android/settings.gradle | 4 - examples/VanillaVideoplayer/app.json | 4 - examples/VanillaVideoplayer/babel.config.js | 3 - examples/VanillaVideoplayer/index.js | 9 - examples/VanillaVideoplayer/ios/.xcode.env | 1 - examples/VanillaVideoplayer/ios/Podfile | 62 - .../project.pbxproj | 725 -- .../xcschemes/VanillaVideoplayer.xcscheme | 88 - .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../ios/VanillaVideoplayer/AppDelegate.h | 6 - .../ios/VanillaVideoplayer/AppDelegate.mm | 26 - .../AppIcon.appiconset/Contents.json | 53 - .../Images.xcassets/Contents.json | 6 - .../ios/VanillaVideoplayer/Info.plist | 55 - .../LaunchScreen.storyboard | 47 - .../ios/VanillaVideoplayer/main.m | 10 - .../ios/VanillaVideoplayerTests/Info.plist | 24 - .../VanillaVideoplayerTests.m | 66 - examples/VanillaVideoplayer/ios/_xcode.env | 11 - examples/VanillaVideoplayer/jest.config.js | 3 - examples/VanillaVideoplayer/metro.config.js | 11 - examples/VanillaVideoplayer/package.json | 38 - examples/VanillaVideoplayer/tsconfig.json | 3 - examples/VanillaVideoplayer/yarn.lock | 6629 ---------- package.json | 18 +- packages/media-console/README.md | 48 +- packages/media-console/package.json | 12 +- packages/media-console/src/VideoPlayer.tsx | 5 +- packages/media-console/src/package.json | 64 - packages/media-console/yarn.lock | 5313 -------- packages/reanimated/README.md | 33 +- packages/reanimated/package.json | 13 +- packages/reanimated/tsconfig.json | 1 - packages/reanimated/yarn.lock | 5313 -------- tsconfig.json | 4 +- yarn.lock | 10764 +++++++--------- 126 files changed, 6544 insertions(+), 25458 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 examples/MyTVProject/.gitignore create mode 100644 examples/MyTVProject/README.md create mode 100644 examples/MyTVProject/app.json create mode 100644 examples/MyTVProject/app/(tabs)/_layout.tsx create mode 100644 examples/MyTVProject/app/(tabs)/explore.tsx create mode 100644 examples/MyTVProject/app/(tabs)/index.tsx create mode 100644 examples/MyTVProject/app/(tabs)/tv_focus.tsx create mode 100644 examples/MyTVProject/app/+html.tsx create mode 100644 examples/MyTVProject/app/+not-found.tsx create mode 100644 examples/MyTVProject/app/_layout.tsx create mode 100755 examples/MyTVProject/assets/fonts/SpaceMono-Regular.ttf create mode 100644 examples/MyTVProject/assets/images/adaptive-icon.png create mode 100644 examples/MyTVProject/assets/images/favicon.png create mode 100644 examples/MyTVProject/assets/images/icon.png create mode 100644 examples/MyTVProject/assets/images/partial-react-logo.png create mode 100644 examples/MyTVProject/assets/images/react-logo.png create mode 100644 examples/MyTVProject/assets/images/react-logo@2x.png create mode 100644 examples/MyTVProject/assets/images/react-logo@3x.png create mode 100644 examples/MyTVProject/assets/images/splash.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-1280x768.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-1920x720.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-2320x720.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-3840x1440.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-400x240.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-4640x1440.png create mode 100644 examples/MyTVProject/assets/tv_icons/icon-800x480.png create mode 100644 examples/MyTVProject/components/Collapsible.tsx create mode 100644 examples/MyTVProject/components/EventHandlingDemo.tsx create mode 100644 examples/MyTVProject/components/ExternalLink.tsx create mode 100644 examples/MyTVProject/components/ExternalLink.tv.tsx create mode 100644 examples/MyTVProject/components/HelloWave.tsx create mode 100644 examples/MyTVProject/components/ParallaxScrollView.tsx create mode 100644 examples/MyTVProject/components/ThemedText.tsx create mode 100644 examples/MyTVProject/components/ThemedView.tsx create mode 100644 examples/MyTVProject/components/__tests__/ThemedText-test.tsx create mode 100644 examples/MyTVProject/components/__tests__/__snapshots__/ThemedText-test.tsx.snap create mode 100644 examples/MyTVProject/components/navigation/TabBarIcon.tsx create mode 100644 examples/MyTVProject/constants/Colors.ts create mode 100644 examples/MyTVProject/constants/TextStyles.ts create mode 100644 examples/MyTVProject/eas.json create mode 100644 examples/MyTVProject/hooks/useColorScheme.ts create mode 100644 examples/MyTVProject/hooks/useColorScheme.web.ts create mode 100644 examples/MyTVProject/hooks/useScale.ts create mode 100644 examples/MyTVProject/hooks/useScale.web.ts create mode 100644 examples/MyTVProject/hooks/useTextStyles.ts create mode 100644 examples/MyTVProject/hooks/useThemeColor.ts create mode 100644 examples/MyTVProject/metro.config.js create mode 100644 examples/MyTVProject/package.json create mode 100644 examples/MyTVProject/tsconfig.json delete mode 100644 examples/VanillaVideoplayer/.bundle/config delete mode 100644 examples/VanillaVideoplayer/.eslintrc.js delete mode 100644 examples/VanillaVideoplayer/.gitignore delete mode 100644 examples/VanillaVideoplayer/.prettierrc.js delete mode 100644 examples/VanillaVideoplayer/.watchmanconfig delete mode 100644 examples/VanillaVideoplayer/App.tsx delete mode 100644 examples/VanillaVideoplayer/Gemfile delete mode 100644 examples/VanillaVideoplayer/README.md delete mode 100644 examples/VanillaVideoplayer/__tests__/App.test.tsx delete mode 100644 examples/VanillaVideoplayer/android/app/build.gradle delete mode 100644 examples/VanillaVideoplayer/android/app/debug.keystore delete mode 100644 examples/VanillaVideoplayer/android/app/proguard-rules.pro delete mode 100644 examples/VanillaVideoplayer/android/app/src/debug/AndroidManifest.xml delete mode 100644 examples/VanillaVideoplayer/android/app/src/debug/java/com/vanillavideoplayer/ReactNativeFlipper.java delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/AndroidManifest.xml delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/java/com/vanillavideoplayer/MainActivity.java delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/java/com/vanillavideoplayer/MainApplication.java delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/drawable/rn_edit_text_material.xml delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/values/strings.xml delete mode 100644 examples/VanillaVideoplayer/android/app/src/main/res/values/styles.xml delete mode 100644 examples/VanillaVideoplayer/android/app/src/release/java/com/vanillavideoplayer/ReactNativeFlipper.java delete mode 100644 examples/VanillaVideoplayer/android/build.gradle delete mode 100644 examples/VanillaVideoplayer/android/gradle.properties delete mode 100644 examples/VanillaVideoplayer/android/gradle/wrapper/gradle-wrapper.jar delete mode 100644 examples/VanillaVideoplayer/android/gradle/wrapper/gradle-wrapper.properties delete mode 100755 examples/VanillaVideoplayer/android/gradlew delete mode 100644 examples/VanillaVideoplayer/android/gradlew.bat delete mode 100644 examples/VanillaVideoplayer/android/settings.gradle delete mode 100644 examples/VanillaVideoplayer/app.json delete mode 100644 examples/VanillaVideoplayer/babel.config.js delete mode 100644 examples/VanillaVideoplayer/index.js delete mode 100644 examples/VanillaVideoplayer/ios/.xcode.env delete mode 100644 examples/VanillaVideoplayer/ios/Podfile delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer.xcodeproj/project.pbxproj delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer.xcodeproj/xcshareddata/xcschemes/VanillaVideoplayer.xcscheme delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer.xcworkspace/contents.xcworkspacedata delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/AppDelegate.h delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/AppDelegate.mm delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/Images.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/Images.xcassets/Contents.json delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/Info.plist delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/LaunchScreen.storyboard delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayer/main.m delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayerTests/Info.plist delete mode 100644 examples/VanillaVideoplayer/ios/VanillaVideoplayerTests/VanillaVideoplayerTests.m delete mode 100644 examples/VanillaVideoplayer/ios/_xcode.env delete mode 100644 examples/VanillaVideoplayer/jest.config.js delete mode 100644 examples/VanillaVideoplayer/metro.config.js delete mode 100644 examples/VanillaVideoplayer/package.json delete mode 100644 examples/VanillaVideoplayer/tsconfig.json delete mode 100644 examples/VanillaVideoplayer/yarn.lock delete mode 100644 packages/media-console/src/package.json delete mode 100644 packages/media-console/yarn.lock delete mode 100644 packages/reanimated/yarn.lock diff --git a/.gitignore b/.gitignore index faf30af..f2a2125 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,13 @@ DerivedData *.ipa *.xcuserstate +#MacOS +.DS_Store + +# Turborepo cache +.turbo + + # Android/IntelliJ # .idea diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4853b0d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing guidelines + +1. Clone this repository. +2. Run `yarn` to install packages in the root folder. +3. Go to `./examples/MyTVProject` +4. Run `yarn start` in the terminal. +5. Open a new terminal and go to `./examples/MyTVProject` again +6. Run `yarn prebuild` +7. Run `yarn ios` or `yarn android` +8. Make your changes to `./packages/media-console` +9. Test the changes on the simulator. If everything is good, you can open a pull request. diff --git a/README.md b/README.md index daf5397..98e837e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ VideoPlayer for the React Native `