Skip to content

Commit

Permalink
Version 2.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Salnikov committed Oct 29, 2024
1 parent 204ed87 commit b3d0c9b
Show file tree
Hide file tree
Showing 1,951 changed files with 1,995 additions and 1,881 deletions.
12 changes: 7 additions & 5 deletions Demo/PlayerDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2.32.1;
CURRENT_PROJECT_VERSION = 2.36;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand All @@ -668,9 +668,10 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.32.1;
MARKETING_VERSION = 2.36;
PRODUCT_BUNDLE_IDENTIFIER = com.onevideo.player.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -684,7 +685,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2.32.1;
CURRENT_PROJECT_VERSION = 2.36;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
Expand All @@ -693,9 +694,10 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.32.1;
MARKETING_VERSION = 2.36;
PRODUCT_BUNDLE_IDENTIFIER = com.onevideo.player.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
STRIP_INSTALLED_PRODUCT = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down Expand Up @@ -730,7 +732,7 @@
repositoryURL = "https://github.com/VKCOM/VideoPlayer-iOS";
requirement = {
kind = exactVersion;
version = 2.32.1;
version = 2.36.0;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
8 changes: 8 additions & 0 deletions Demo/PlayerDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

print("Demo: OVPlayerKit v\(Environment.versionOVPlayerKit), OVKit v\(Environment.versionOVKit), OVKResources v\(Environment.versionOVKResources)")

PersistenceManager.warmup()

/*
Основная документация находится в OVLogger.h. Настройку логов следует выполнять опираясь на следующие рекомендации:
Expand Down Expand Up @@ -74,4 +76,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
#endif
return true
}

func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
PersistenceManager.handleBackgroundSession(identifier: identifier, completionHandler: completionHandler)
}


}
7 changes: 4 additions & 3 deletions Demo/PlayerDemo/Downloads/DownloadService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class DownloadService {
}

func downloadVideo(_ video: VideoType) {
downloader.downloadVideo(video, inQuality: 1080, userData: nil)
let useHLS = SettingsViewController.useHLS
downloader.downloadVideo(video, inQuality: 1080, useHLS: useHLS, userData: nil)
}

func deleteVideo(_ video: VideoType) {
Expand All @@ -52,8 +53,8 @@ class DownloadService {
downloader.state(of: item) // Немного блокирующий вызов может быть
}

func getVideo(of item: PersistentItem) -> Video {
downloader.video(of: item)
func getVideo(of item: PersistentItem, forLocalPlayback: Bool = false) -> Video {
downloader.video(of: item, forLocalPlayback: forLocalPlayback)
}

func hasVideo(_ video: VideoType) -> Bool {
Expand Down
2 changes: 1 addition & 1 deletion Demo/PlayerDemo/Downloads/DownloadsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DownloadsController: CollectionController {
private func updateDataSource() {
DispatchQueue.global(qos: .userInitiated).async {
let items: [DownloadItemModel] = DownloadService.shared.items.map { item in
let video = DownloadService.shared.getVideo(of: item)
let video = DownloadService.shared.getVideo(of: item, forLocalPlayback: true)
return DownloadItemModel(persistentItem: item, video: video)
}

Expand Down
6 changes: 5 additions & 1 deletion Demo/PlayerDemo/Feed/FeedController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,14 @@ extension FeedController: ListPrefetcherDataSource {
// MARK: - ListPrefetcherDelegate

extension FeedController: ListPrefetcherDelegate {

func listPrefetcher(_ prefetcher: ListPrefetcher, didPrefetchItem item: PrefetchItem) {
os_log("Prefetcher did prefetch item %@", log: .default, type: .info, "\(item)")
}

func listPrefetcher(_ prefetcher: OVKit.ListPrefetcher, didFailToPrefetchItem item: any OVKit.PrefetchItem, withError error: (any Error)?) {
let description = error != nil ? error.debugDescription : "unknown"
os_log("Prefetcher did fail to prefetch item %@ with %@ error", log: .default, type: .error, "\(item)", description)
}
}

// MARK: - Notifications
Expand Down
5 changes: 5 additions & 0 deletions Demo/PlayerDemo/Settings/Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ extension Environment {
static var demo_focusDebug: String { "\(String(describing: Environment.self)).\(#keyPath(SettingsViewController.focusDebug))" }
#endif

static var demo_hlsDownload: String { "\(String(describing: Environment.self)).\(#keyPath(SettingsViewController.useHLS))" }

static let demo_apiClientIdKey = "demo_apiClientId"
static let demo_apiSecretKey = "demo_apiSecret"

Expand Down Expand Up @@ -45,6 +47,9 @@ extension Environment {
SettingsViewController.focusDebug = UserDefaults.standard.bool(forKey: Environment.demo_focusDebug)
}
#endif
if UserDefaults.standard.object(forKey: Environment.demo_hlsDownload) != nil {
SettingsViewController.useHLS = UserDefaults.standard.bool(forKey: Environment.demo_hlsDownload)
}
}


Expand Down
20 changes: 20 additions & 0 deletions Demo/PlayerDemo/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class SettingsViewController: UIHostingController<SettingsView> {

/// Включает режим отображения плеера, на котором находится фокус автоплея.
@objc public static var focusDebug = false
/// Включает загрузку видео в формате HLS
@objc public static var useHLS = false
}

struct SettingsView: View {
Expand Down Expand Up @@ -34,6 +36,9 @@ struct SettingsView: View {
private var focusDebug: Bool = false
#endif

@AppStorage(Environment.demo_hlsDownload)
private var videoInHLS: Bool = false

@AppStorage(Environment.demo_apiClientIdKey)
private var clientId: String = ""

Expand Down Expand Up @@ -80,6 +85,16 @@ struct SettingsView: View {
Text("Enable Focus Preview for autoplay feature.")
}
#endif

if Environment._enableHLSDownload {
Section {
Toggle(isOn: $videoInHLS.animation()) {
Text("Download videos in HLS")
}
.onChange(of: videoInHLS, perform: self.updateHLS)
}
}

Section {
NavigationLink("Advertisement") {
List {
Expand Down Expand Up @@ -211,4 +226,9 @@ struct SettingsView: View {

#endif

private func updateHLS(value: Bool) {
videoInHLS = value
SettingsViewController.useHLS = videoInHLS
}

}
18 changes: 9 additions & 9 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
// swift-tools-version: 5.9
// 2024-09-26 13:46:34
// Version: 2.32.1
// App version: 8.98
// 2024-10-29 13:44:19
// Version: 2.36.0
// App version: 8.102

import PackageDescription

let package = Package(name: "VKVideoPlayer", platforms: [.iOS(.v14)],
products: [
.library(name: "VKVideoPlayer", targets: ["OVKResources", "OVPlayerKit", "OVKit", "OVKitStatistics", "Dav1d", "VPX", "WebM", "VKOpus"]),
.library(name: "VKVideoPlayer", targets: ["Dav1d", "OVKResources", "OVKit", "OVKitStatistics", "OVPlayerKit", "WebM", "VKOpus", "VPX"]),
],
targets: [
.binaryTarget(name: "OVKResources", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKResources/2.70.1/OVKResources.xcframework.zip", checksum: "f2622ef55944733622839ea881f4f85d2df612c4d6377b9483a180fe0a10425e"),
.binaryTarget(name: "OVPlayerKit", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVPlayerKit/3.72.1/OVPlayerKit.xcframework.zip", checksum: "b14881af1618c9b71c0fc1cc78870848481a522c5b24f4462f43fedd5f80f5ca"),
.binaryTarget(name: "OVKit", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKit/5.32.1/OVKit.xcframework.zip", checksum: "949c33a51846a6090546c82aad7c5235f5e77194a897f4e40b180b90e6141aeb"),
.binaryTarget(name: "OVKitStatistics", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKitStatistics/1.19.1/OVKitStatistics.xcframework.zip", checksum: "bcbc6261a3b9c87ea57851fa6d48ecdc0b4feb7f3ab948ae3ac31ae627b2d49a"),
.binaryTarget(name: "Dav1d", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/Dav1d/2.0/Dav1d.xcframework.zip", checksum: "f9c1945e81936dd4fde648e8716eeb01cbcfe762f462d4efd6dac8782fac5399"),
.binaryTarget(name: "VPX", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/VPX/1.2/VPX.xcframework.zip", checksum: "34fbd586d33a83a95942a507a39e7b2856b12c6a1e1f91de3400548e28ac39e3"),
.binaryTarget(name: "OVKResources", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKResources/2.74/OVKResources.xcframework.zip", checksum: "1d97c68fc4b511ce26cbfddda7854868a73499eb1d2ad0ba2f1f6f698b3af0f9"),
.binaryTarget(name: "OVKit", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKit/5.36/OVKit.xcframework.zip", checksum: "1a5ca834b55b26fc78d949da3d284b565e001216aea2c862fd80086e98d3c164"),
.binaryTarget(name: "OVKitStatistics", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVKitStatistics/1.23/OVKitStatistics.xcframework.zip", checksum: "0a3165e00fa866a0764577eb9aeefc7b93322a8681239a2d51509464d9b55c34"),
.binaryTarget(name: "OVPlayerKit", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/OVPlayerKit/3.76/OVPlayerKit.xcframework.zip", checksum: "015c6f9c647c1da9436c70f68fe3d2902c1af9c512f33942e032e2fa7a6da127"),
.binaryTarget(name: "WebM", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/WebM/1.2/WebM.xcframework.zip", checksum: "a6d0946a01036e3f09bc09b737021b778351bfc243bd48b315273adc79b73a50"),
.binaryTarget(name: "VKOpus", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/VKOpus/1.0/VKOpus.xcframework.zip", checksum: "6ac2419048a1479f94d1d9ce434735fad9190dae2b087bad0f1581530013508f"),
.binaryTarget(name: "VPX", url: "https://artifactory-external.vkpartner.ru/artifactory/vk-ios-sdk/VPX/1.2/VPX.xcframework.zip", checksum: "34fbd586d33a83a95942a507a39e7b2856b12c6a1e1f91de3400548e28ac39e3"),
]
)
10 changes: 5 additions & 5 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ artifactory_url = 'https://artifactory-external.vkpartner.ru/artifactory/vk-ios-
target 'PlayerDemo' do
use_frameworks!

pod 'OVKResources', :podspec => "#{artifactory_url}/OVKResources/2.70.1/OVKResources.podspec", :inhibit_warnings => true
pod 'OVPlayerKit', :podspec => "#{artifactory_url}/OVPlayerKit/3.72.1/OVPlayerKit.podspec", :inhibit_warnings => true
pod 'OVKit', :podspec => "#{artifactory_url}/OVKit/5.32.1/OVKit.podspec", :inhibit_warnings => true
pod 'OVKitStatistics', :podspec => "#{artifactory_url}/OVKitStatistics/1.19.1/OVKitStatistics.podspec", :inhibit_warnings => true
pod 'Dav1d', :podspec => "#{artifactory_url}/Dav1d/2.0/Dav1d.podspec", :inhibit_warnings => true
pod 'VPX', :podspec => "#{artifactory_url}/VPX/1.2/VPX.podspec", :inhibit_warnings => true
pod 'OVKResources', :podspec => "#{artifactory_url}/OVKResources/2.74/OVKResources.podspec", :inhibit_warnings => true
pod 'OVKit', :podspec => "#{artifactory_url}/OVKit/5.36/OVKit.podspec", :inhibit_warnings => true
pod 'OVKitStatistics', :podspec => "#{artifactory_url}/OVKitStatistics/1.23/OVKitStatistics.podspec", :inhibit_warnings => true
pod 'OVPlayerKit', :podspec => "#{artifactory_url}/OVPlayerKit/3.76/OVPlayerKit.podspec", :inhibit_warnings => true
pod 'WebM', :podspec => "#{artifactory_url}/WebM/1.2/WebM.podspec", :inhibit_warnings => true
pod 'VKOpus', :podspec => "#{artifactory_url}/VKOpus/1.0/VKOpus.podspec", :inhibit_warnings => true
pod 'VPX', :podspec => "#{artifactory_url}/VPX/1.2/VPX.podspec", :inhibit_warnings => true
end
2 changes: 1 addition & 1 deletion docs/data/documentation/ovkit.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/data/documentation/ovkit/adinteractive.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"AdInteractive","kind":"identifier"}],"platforms":["iOS"],"languages":["swift"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive","interfaceLanguage":"swift"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"topicSections":[{"title":"Enumeration Cases","anchor":"Enumeration-Cases","identifiers":["doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/shoppable(items:)","doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/videoMotion(banner:)"],"generated":true}],"metadata":{"modules":[{"name":"OVKit"}],"roleHeading":"Enumeration","title":"AdInteractive","externalID":"s:5OVKit13AdInteractiveO","navigatorTitle":[{"text":"AdInteractive","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"AdInteractive"}],"symbolKind":"enum","role":"symbol"},"sections":[],"hierarchy":{"paths":[["doc:\/\/onevideo.OVKit\/documentation\/OVKit"]]},"variants":[{"paths":["\/documentation\/ovkit\/adinteractive"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://onevideo.OVKit/documentation/OVKit/AdInteractive":{"identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive","type":"topic","title":"AdInteractive","navigatorTitle":[{"text":"AdInteractive","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"AdInteractive","kind":"identifier"}],"abstract":[],"kind":"symbol","url":"\/documentation\/ovkit\/adinteractive","role":"symbol"},"doc://onevideo.OVKit/documentation/OVKit/AdInteractive/shoppable(items:)":{"role":"symbol","identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/shoppable(items:)","kind":"symbol","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"text":"shoppable","kind":"identifier"},{"text":"(","kind":"text"},{"text":"items","kind":"externalParam"},{"kind":"text","text":": ["},{"text":"ShoppableAdsItem","kind":"typeIdentifier","preciseIdentifier":"s:5OVKit16ShoppableAdsItemV"},{"kind":"text","text":"])"}],"url":"\/documentation\/ovkit\/adinteractive\/shoppable(items:)","abstract":[],"title":"AdInteractive.shoppable(items:)","type":"topic"},"doc://onevideo.OVKit/documentation/OVKit":{"abstract":[{"type":"text","text":"Плеер видео и трансляций для VK Видео."}],"role":"collection","url":"\/documentation\/ovkit","title":"OVKit","type":"topic","identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit","kind":"symbol"},"doc://onevideo.OVKit/documentation/OVKit/AdInteractive/videoMotion(banner:)":{"identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/videoMotion(banner:)","type":"topic","title":"AdInteractive.videoMotion(banner:)","fragments":[{"kind":"keyword","text":"case"},{"text":" ","kind":"text"},{"kind":"identifier","text":"videoMotion"},{"text":"(","kind":"text"},{"text":"banner","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"c:@M@OVKit@objc(pl)MyTargetInstreamAdVideoMotionBanner","kind":"typeIdentifier","text":"MyTargetInstreamAdVideoMotionBanner"},{"text":")","kind":"text"}],"abstract":[],"kind":"symbol","url":"\/documentation\/ovkit\/adinteractive\/videomotion(banner:)","role":"symbol"}}}
{"topicSections":[{"anchor":"Enumeration-Cases","title":"Enumeration Cases","identifiers":["doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/shoppable(items:)","doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/videoMotion(banner:)"],"generated":true}],"hierarchy":{"paths":[["doc:\/\/onevideo.OVKit\/documentation\/OVKit"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/ovkit\/adinteractive"]}],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"AdInteractive"}],"languages":["swift"],"platforms":["iOS"]}],"kind":"declarations"}],"identifier":{"url":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive","interfaceLanguage":"swift"},"metadata":{"modules":[{"name":"OVKit"}],"roleHeading":"Enumeration","navigatorTitle":[{"text":"AdInteractive","kind":"identifier"}],"role":"symbol","title":"AdInteractive","externalID":"s:5OVKit13AdInteractiveO","symbolKind":"enum","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"AdInteractive","kind":"identifier"}]},"references":{"doc://onevideo.OVKit/documentation/OVKit/AdInteractive/shoppable(items:)":{"title":"AdInteractive.shoppable(items:)","type":"topic","abstract":[],"kind":"symbol","role":"symbol","url":"\/documentation\/ovkit\/adinteractive\/shoppable(items:)","identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/shoppable(items:)","fragments":[{"text":"case","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"shoppable"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"items"},{"kind":"text","text":": ["},{"kind":"typeIdentifier","preciseIdentifier":"s:5OVKit16ShoppableAdsItemV","text":"ShoppableAdsItem"},{"kind":"text","text":"])"}]},"doc://onevideo.OVKit/documentation/OVKit/AdInteractive/videoMotion(banner:)":{"abstract":[],"identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive\/videoMotion(banner:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"videoMotion","kind":"identifier"},{"kind":"text","text":"("},{"text":"banner","kind":"externalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"c:@M@OVKit@objc(pl)MyTargetInstreamAdVideoMotionBanner","text":"MyTargetInstreamAdVideoMotionBanner"},{"kind":"text","text":")"}],"role":"symbol","type":"topic","url":"\/documentation\/ovkit\/adinteractive\/videomotion(banner:)","kind":"symbol","title":"AdInteractive.videoMotion(banner:)"},"doc://onevideo.OVKit/documentation/OVKit/AdInteractive":{"navigatorTitle":[{"text":"AdInteractive","kind":"identifier"}],"title":"AdInteractive","kind":"symbol","identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit\/AdInteractive","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"AdInteractive"}],"role":"symbol","type":"topic","url":"\/documentation\/ovkit\/adinteractive","abstract":[]},"doc://onevideo.OVKit/documentation/OVKit":{"type":"topic","url":"\/documentation\/ovkit","title":"OVKit","abstract":[{"text":"Плеер видео и трансляций для VK Видео.","type":"text"}],"kind":"symbol","role":"collection","identifier":"doc:\/\/onevideo.OVKit\/documentation\/OVKit"}}}
Loading

0 comments on commit b3d0c9b

Please sign in to comment.