feat: KSPlayer as an option for iOS + other improvements (#1266)

This commit is contained in:
Fredrik Burmester
2026-01-03 13:05:50 +01:00
committed by GitHub
parent d1795c9df8
commit 74d86b5d12
191 changed files with 88479 additions and 2316 deletions

View File

@@ -112,14 +112,19 @@ const VlcPlayerView = React.forwardRef<VlcPlayerViewRef, VlcPlayerViewProps>(
...otherProps
} = props;
const processedSource: VlcPlayerSource =
const baseSource: VlcPlayerSource =
typeof source === "string"
? ({ uri: source } as unknown as VlcPlayerSource)
: source;
if (processedSource.startPosition !== undefined) {
processedSource.startPosition = Math.floor(processedSource.startPosition);
}
// Create a new object to avoid mutating frozen source
const processedSource: VlcPlayerSource = {
...baseSource,
startPosition:
baseSource.startPosition !== undefined
? Math.floor(baseSource.startPosition)
: undefined,
};
return (
<NativeView