Skip to content

Commit

Permalink
chore: set hls as priority quality for .auto case
Browse files Browse the repository at this point in the history
  • Loading branch information
rnr committed Jan 20, 2025
1 parent 700cc80 commit c1d6f7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Core/Core/Domain/Model/CourseBlockModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public struct CourseBlockEncodedVideo: Sendable {
public func video(downloadQuality: DownloadQuality) -> CourseBlockVideo? {
switch downloadQuality {
case .auto:
[mobileLow, mobileHigh, desktopMP4, fallback, hls]
[hls, mobileLow, mobileHigh, desktopMP4, fallback]
.first(where: { $0?.isDownloadable == true })?
.flatMap { $0 }
case .high:
Expand All @@ -400,7 +400,7 @@ public struct CourseBlockEncodedVideo: Sendable {
public func video(streamingQuality: StreamingQuality) -> CourseBlockVideo? {
switch streamingQuality {
case .auto:
[mobileLow, mobileHigh, desktopMP4, fallback, hls, youtube]
[hls, mobileLow, mobileHigh, desktopMP4, fallback, youtube]
.compactMap { $0 }
.sorted(by: { ($0?.streamPriority ?? 0) < ($1?.streamPriority ?? 0) })
.first?
Expand All @@ -424,7 +424,7 @@ public struct CourseBlockEncodedVideo: Sendable {
}
}

public enum CourseBlockVideoEncoding {
public enum CourseBlockVideoEncoding: Sendable {
case mobileLow, mobileHigh, desktopMP4, fallback, hls, youtube
}

Expand Down

0 comments on commit c1d6f7c

Please sign in to comment.