Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use specified video version in native player #637

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import com.google.android.exoplayer2.source.ProgressiveMediaSource
import com.google.android.exoplayer2.source.SingleSampleMediaSource
import com.google.android.exoplayer2.source.hls.HlsMediaSource
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector
import org.jellyfin.mobile.player.interaction.PlayOptions
import org.jellyfin.mobile.player.PlayerException
import org.jellyfin.mobile.player.PlayerViewModel
import org.jellyfin.mobile.player.interaction.PlayOptions
import org.jellyfin.mobile.player.source.JellyfinMediaSource
import org.jellyfin.mobile.player.source.MediaSourceResolver
import org.jellyfin.mobile.utils.clearSelectionAndDisableRendererByType
Expand Down Expand Up @@ -53,7 +53,7 @@ class QueueManager(
*/
suspend fun startPlayback(playOptions: PlayOptions): PlayerException? {
if (playOptions != currentPlayOptions) {
val itemId = playOptions.ids[playOptions.startIndex]
val itemId = playOptions.run { mediaSourceId ?: ids[playOptions.startIndex] }
mediaSourceResolver.resolveMediaSource(
itemId = itemId,
deviceProfile = deviceProfile,
Expand Down