block global audio from screens
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useFocusEffect } from "@react-navigation/native";
|
||||
import useSharedAudioPlayer from "../../hooks/useSharedAudioPlayer";
|
||||
import { useCameraPermissions } from "expo-camera";
|
||||
import React, {
|
||||
useCallback,
|
||||
@@ -11,12 +10,13 @@ import React, {
|
||||
import { Text, View } from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import Svg, { Circle } from "react-native-svg";
|
||||
import alert from "../../components/Alert";
|
||||
import GradientButton from "../../components/GradientButton";
|
||||
import KaraokeLyrics from "../../components/KaraokeLyrics";
|
||||
import MusicLandHeader from "../../components/MusicLandHeader";
|
||||
import alert from "../../components/Alert";
|
||||
import { increment, projectsRef } from "../../config/firebase";
|
||||
import { isWeb } from "../../hooks/useLayoutType";
|
||||
import useSharedAudioPlayer from "../../hooks/useSharedAudioPlayer";
|
||||
import Page from "../../layouts/Page";
|
||||
import { Routes } from "../../navigation";
|
||||
import { goBack, navigate } from "../../navigation/NavigationService";
|
||||
@@ -62,12 +62,13 @@ const RecordPlayback = ({ route }) => {
|
||||
// Player
|
||||
const songUrl = project?.songUrl || null;
|
||||
const player = useSharedAudioPlayer(songUrl ? { uri: songUrl } : undefined, {
|
||||
id: projectId ? `record-${projectId}` : songUrl ? `record-${songUrl}` : undefined,
|
||||
id: project?.id,
|
||||
title: typeof project?.title === "string" ? project.title : "Sans titre",
|
||||
artist: typeof project?.userName === "string" ? project.userName : "MusicLand",
|
||||
artist:
|
||||
typeof project?.userName === "string" ? project.userName : "MusicLand",
|
||||
artwork: project?.coverUrl || null,
|
||||
coverUrl: project?.coverUrl || null,
|
||||
metadata: { projectId, screen: "RecordPlayback" },
|
||||
metadata: { projectId: project?.id, screen: "RecordPlayback" },
|
||||
});
|
||||
|
||||
// MediaStream / Recorder (web only)
|
||||
|
||||
Reference in New Issue
Block a user