swiper
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { useRoute } from "@react-navigation/core";
|
|
||||||
import { useAudioPlayer } from "expo-audio";
|
import { useAudioPlayer } from "expo-audio";
|
||||||
import { Image as ExpoImage } from "expo-image";
|
import { Image as ExpoImage } from "expo-image";
|
||||||
import React, { useEffect, useMemo, useRef, useState } from "react";
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||||
@@ -34,8 +33,8 @@ import Style, { gutters, size } from "../../styles/Style";
|
|||||||
// 20 secondes
|
// 20 secondes
|
||||||
const timeBeforeIncrement = 20000;
|
const timeBeforeIncrement = 20000;
|
||||||
|
|
||||||
const MusicDetails = () => {
|
const MusicDetails = ({ route }) => {
|
||||||
const params = useRoute().params || {};
|
const { params } = route || {};
|
||||||
const action = params?.action;
|
const action = params?.action;
|
||||||
const projectId = params?.projectId || null;
|
const projectId = params?.projectId || null;
|
||||||
const [fav, setFav] = useState(false);
|
const [fav, setFav] = useState(false);
|
||||||
@@ -218,7 +217,10 @@ const MusicDetails = () => {
|
|||||||
[progressInfo.pos]
|
[progressInfo.pos]
|
||||||
);
|
);
|
||||||
// Preview lead: show words 0.5s earlier
|
// Preview lead: show words 0.5s earlier
|
||||||
const visibleTimeS = useMemo(() => Math.max(0, currentTimeS + 0.5), [currentTimeS]);
|
const visibleTimeS = useMemo(
|
||||||
|
() => Math.max(0, currentTimeS + 0.5),
|
||||||
|
[currentTimeS]
|
||||||
|
);
|
||||||
// Group words into timed lines (similar to KaraokeLyrics)
|
// Group words into timed lines (similar to KaraokeLyrics)
|
||||||
const groupAlignedWordsToLines = (words = [], { removeTags = true } = {}) => {
|
const groupAlignedWordsToLines = (words = [], { removeTags = true } = {}) => {
|
||||||
const out = [];
|
const out = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user