mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-05 12:02:55 +01:00
feat: KSPlayer as an option for iOS + other improvements (#1266)
This commit is contained in:
committed by
GitHub
parent
d1795c9df8
commit
74d86b5d12
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user