react-native-video/examples/expo
Krzysztof Moch 9eb5502076
chore: rework examples (#4225)
* remove unused examples

* init bare example with test app

* add react-native-video

* add test app suport in expo plugin

* expo plugin: skip keys that are already in pod file

* fix podfile

* add src files

* fix metro config

* finalize react native test app configuration

* init expo example

* remove old examples

* add guide for example

* Add link to examples apps in docs

* adopt bare example to CI tests

* update CI workflows

* CI build lib after node_modules install

* fix examples readme

* fix iOS CI

* Add Example for DRM

* Update examples/README.md

* fix links

* update examples README

* sync example code

* update README
2024-10-20 20:04:02 +02:00
..
android chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
assets/images chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
ios chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
src chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
.gitignore chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
app.json chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
App.tsx chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
App.tv.tsx chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
babel.config.js chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
index.js chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
metro.config.js chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
package.json chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
README.md chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00
tsconfig.json chore: rework examples (#4225) 2024-10-20 20:04:02 +02:00

TV Example

Creates a project that can build for Apple TV and Android TV targets.

This project uses

🚀 How to use

Creating a new project

  • Create a project: npx create-expo-app -e with-tv
  • cd into the project
export EXPO_TV=1
npx expo prebuild
yarn ios # Build for Apple TV
yarn android # Build for Android TV

NOTE: Setting the environment variable EXPO_TV=1 enables the @react-native-tvos/config-tv plugin to modify the project for TV. This can also be done by setting the parameter isTV to true in the app.json.

TV specific file extensions

This project contains an example Metro configuration that allows Metro to resolve application source files with TV-specific code, indicated by specific file extensions (*.ios.tv.tsx, *.android.tv.tsx, *.tv.tsx). This config is not enabled by default, since it will impact bundling performance, but is available for developers who need this capability.

TV specific app icons and banners

This project contains placeholder images for the Android TV banner and for Apple TV brand assets (app icon and top shelf images). The config-tv plugin will use these images to construct the required native image files and make the right modifications in project files. You can simply replace these images with your own app images. Note that for Apple TV, the images must be the exact sizes indicated.