mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
feat: support start time
This commit is contained in:
@@ -97,6 +97,7 @@ class VlcPlayerView: ExpoView {
|
||||
let initType = source["initType"] as? Int ?? 0
|
||||
let autoplay = source["autoplay"] as? Bool ?? false
|
||||
let isNetwork = source["isNetwork"] as? Bool ?? false
|
||||
let startPosition = source["startPosition"] as? Int32 ?? 0
|
||||
|
||||
guard let uri = uri, !uri.isEmpty else { return }
|
||||
|
||||
@@ -152,6 +153,10 @@ class VlcPlayerView: ExpoView {
|
||||
|
||||
self.mediaPlayer?.media = media
|
||||
|
||||
if startPosition > 0 {
|
||||
self.mediaPlayer?.time = VLCTime(int: startPosition)
|
||||
}
|
||||
|
||||
if autoplay {
|
||||
self.play()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user