mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-16 02:44:51 +00:00
fix(source): remove array syntax
This commit is contained in:
@@ -60,7 +60,7 @@ const PlayerInitializer = ({
|
||||
|
||||
useEffect(() => {
|
||||
player.source = source;
|
||||
const uri = source?.src[0]?.uri;
|
||||
const uri = source?.src?.uri;
|
||||
if (uri !== seekedForSrc.current) {
|
||||
seekedForSrc.current = uri;
|
||||
if (source?.startTime) store.seek(source.startTime);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
export interface Source {
|
||||
src: VideoSrc[];
|
||||
src: VideoSrc;
|
||||
startTime?: number;
|
||||
subtitles: Subtitle[];
|
||||
// fonts that can be used by ass subtitles on the web (native will use
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ export const OmniView = ({
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const ref = useRef<HTMLVideoElement>(undefined!);
|
||||
|
||||
const src = player.source?.src[0];
|
||||
const src = player.source?.src;
|
||||
const isHls =
|
||||
src?.mimeType?.toLowerCase().includes("mpegurl") ||
|
||||
src?.uri.split(/[?#]/)[0]?.toLowerCase().endsWith(".m3u8") ||
|
||||
|
||||
Reference in New Issue
Block a user