chore: move sample to expo (#3880)

* perf: ensure we do not provide callback to native if no callback provided from app

* chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size

* chore: improve issue template

* fix(android): avoid video view flickering at playback startup

* fix: ensure player doesn't start when view is unmounted

* chore: move basic sample to expo

* Update examples/basic/package.json

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>

* chore: use last expo version

* chore: fix podfile

---------

Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
This commit is contained in:
Olivier Bouillet
2024-06-20 11:58:55 +02:00
committed by GitHub
parent 856b1dd58b
commit c1c7a056f1
15 changed files with 3403 additions and 432 deletions

View File

@@ -8,12 +8,16 @@ const path = require('path');
const escape = require('escape-string-regexp');
const blacklist = require('metro-config/src/defaults/exclusionList');
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
const { getDefaultConfig } = require('expo/metro-config');
const { mergeConfig } = require('@react-native/metro-config');
const pak = require('../../package.json');
const root = path.resolve(__dirname, '../..');
const modules = Object.keys({...pak.peerDependencies});
const defaultConfig = getDefaultConfig(__dirname)
const { resolver, transformer } = defaultConfig
/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
@@ -23,6 +27,7 @@ const modules = Object.keys({...pak.peerDependencies});
const config = {
watchFolders: [root],
resolver: {
...resolver,
blacklistRE: blacklist([
// This stops "react-native run-windows" from causing the metro server to crash if its already running
new RegExp(
@@ -48,6 +53,7 @@ const config = {
path.resolve(path.join(__dirname, '../../node_modules')),
],
transformer: {
...transformer,
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
@@ -56,6 +62,9 @@ const config = {
}),
},
},
transformer: {
...transformer, // <--- THIS WAS MISSING
},
};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
module.exports = mergeConfig(defaultConfig, config);