mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Fixed not direct playing
This commit is contained in:
@@ -119,7 +119,7 @@ export default function page() {
|
|||||||
maxStreamingBitrate: bitrateValue,
|
maxStreamingBitrate: bitrateValue,
|
||||||
mediaSourceId: mediaSourceId,
|
mediaSourceId: mediaSourceId,
|
||||||
subtitleStreamIndex: subtitleIndex,
|
subtitleStreamIndex: subtitleIndex,
|
||||||
deviceProfile: Platform.OS === "android" ? android : native,
|
deviceProfile: native,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!res) return null;
|
if (!res) return null;
|
||||||
|
|||||||
@@ -148,10 +148,17 @@ class VlcPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
mediaPlayer?.addSlave(IMedia.Slave.Type.Subtitle, Uri.parse(subtitleURL), true)
|
mediaPlayer?.addSlave(IMedia.Slave.Type.Subtitle, Uri.parse(subtitleURL), true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Kotlin has its own garbage collector.
|
|
||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
println("onDetachedFromWindow")
|
println("onDetachedFromWindow")
|
||||||
|
super.onDetachedFromWindow()
|
||||||
|
mediaPlayer?.stop()
|
||||||
|
|
||||||
|
media?.release()
|
||||||
|
mediaPlayer?.release()
|
||||||
|
libVLC?.release()
|
||||||
|
mediaPlayer = null
|
||||||
|
media = null
|
||||||
|
libVLC = null
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onEvent(event: MediaPlayer.Event) {
|
override fun onEvent(event: MediaPlayer.Event) {
|
||||||
|
|||||||
@@ -91,6 +91,9 @@ export default {
|
|||||||
{ Format: "pgs", Method: "Embed" },
|
{ Format: "pgs", Method: "Embed" },
|
||||||
{ Format: "pgs", Method: "External" },
|
{ Format: "pgs", Method: "External" },
|
||||||
{ Format: "pgs", Method: "Encode" },
|
{ Format: "pgs", Method: "Encode" },
|
||||||
|
{ Format: "pgssub", Method: "Embed" },
|
||||||
|
{ Format: "pgssub", Method: "External" },
|
||||||
|
{ Format: "pgssub", Method: "Encode" },
|
||||||
{ Format: "dvdsub", Method: "Embed" },
|
{ Format: "dvdsub", Method: "Embed" },
|
||||||
{ Format: "dvdsub", Method: "External" },
|
{ Format: "dvdsub", Method: "External" },
|
||||||
{ Format: "dvdsub", Method: "Encode" },
|
{ Format: "dvdsub", Method: "Encode" },
|
||||||
|
|||||||
Reference in New Issue
Block a user