Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Sources/YouTubeKit/InnerTube.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class InnerTube {

private let baseURL = "https://www.youtube.com/youtubei/v1"

init(client: ClientType = .ios, useOAuth: Bool = false, allowCache: Bool = true) {
init(client: ClientType = .web, useOAuth: Bool = false, allowCache: Bool = true) {
self.context = defaultClients[client]!.context
self.apiKey = defaultClients[client]!.apiKey
self.headers = defaultClients[client]!.headers
Expand Down
16 changes: 8 additions & 8 deletions Sources/YouTubeKit/Models/ITag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ public struct ITag {
let itag: Int

/// lower side of resolution (e.g. 1080 for 1080p)
let videoResolution: Int?
public let videoResolution: Int?

/// in kbps
let audioBitrate: Int?
public let audioBitrate: Int?

init?(_ itag: Int) {
self.itag = itag

Expand All @@ -28,19 +28,19 @@ public struct ITag {
audioBitrate = rates.1
}

var isHDR: Bool {
public var isHDR: Bool {
[330, 331, 332, 333, 334, 335, 336, 337].contains(itag)
}

var is3D: Bool {
public var is3D: Bool {
[82, 83, 84, 85, 100, 101, 102].contains(itag)
}

var isLive: Bool {
public var isLive: Bool {
[91, 92, 93, 94, 95, 96, 132, 151].contains(itag)
}

var isDash: Bool {
public var isDash: Bool {
DASH_AUDIO.keys.contains(itag) || DASH_VIDEO.keys.contains(itag)
}

Expand Down