mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-05 13:46:59 +00:00
feat(chromecast): send custom message for overlay subtitles
This commit is contained in:
+2
-2
@@ -88,7 +88,7 @@ function PlayerExample({
|
||||
|
||||
useEffect(() => {
|
||||
refreshTracks();
|
||||
}, [refreshTracks, trackLabel]);
|
||||
}, [refreshTracks]);
|
||||
|
||||
const pushLog = useCallback((message: string) => {
|
||||
setLogs((prev) => {
|
||||
@@ -194,7 +194,7 @@ function PlayerExample({
|
||||
|
||||
const cyclePlaybackRate = () => {
|
||||
const rates = [0.75, 1, 1.25, 1.5, 2];
|
||||
const index = rates.findIndex((rate) => rate === playbackRate);
|
||||
const index = rates.indexOf(playbackRate);
|
||||
const nextIndex = (index + 1) % rates.length;
|
||||
player.playbackRate = rates[nextIndex];
|
||||
};
|
||||
|
||||
@@ -9,5 +9,5 @@ import { name as appName } from "./app.json";
|
||||
AppRegistry.registerComponent(appName, () => App);
|
||||
|
||||
AppRegistry.runApplication(appName, {
|
||||
rootTag: document.getElementById("root"),
|
||||
rootTag: document.getElementById("root"),
|
||||
});
|
||||
|
||||
+20
-16
@@ -11,22 +11,26 @@ const useWeb = process.env.USE_WEB === "true" || process.env.PLATFORM === "web";
|
||||
* @type {import('metro-config').MetroConfig}
|
||||
*/
|
||||
const config = {
|
||||
watchFolders: [root],
|
||||
...(useWeb && {
|
||||
resolver: {
|
||||
extraNodeModules: {
|
||||
"react-native": path.resolve(__dirname, "node_modules", "react-native-web"),
|
||||
},
|
||||
},
|
||||
}),
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: true,
|
||||
},
|
||||
}),
|
||||
},
|
||||
watchFolders: [root],
|
||||
...(useWeb && {
|
||||
resolver: {
|
||||
extraNodeModules: {
|
||||
"react-native": path.resolve(
|
||||
__dirname,
|
||||
"node_modules",
|
||||
"react-native-web",
|
||||
),
|
||||
},
|
||||
},
|
||||
}),
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: true,
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const path = require("path");
|
||||
const path = require("node:path");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
|
||||
const appDirectory = path.resolve(__dirname);
|
||||
|
||||
Reference in New Issue
Block a user