Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Added max ad search time parsing #45

Merged
merged 1 commit into from
Jan 30, 2019
Merged
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 PlayerCore
1 change: 1 addition & 0 deletions sources/VVPSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public struct VVPSDK {
softTimeout: videoResponse.adSettings.softTimeout,
hardTimeout: videoResponse.adSettings.hardTimeout,
startTimeout: videoResponse.adSettings.startTimeout,
maxSearchTime: videoResponse.adSettings.maxSearchTime,
maxDuration: videoResponse.adSettings.maxDuration,
maxVASTWrapperRedirectCount: videoResponse.adSettings.maxVASTWrapperRedirectCount)

Expand Down
1 change: 1 addition & 0 deletions sources/player/observer/ObserverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ObserverTests: XCTestCase {
softTimeout: 2.5,
hardTimeout: 3.5,
startTimeout: 4,
maxSearchTime: 9,
maxDuration: 90,
maxVASTWrapperRedirectCount: 3),
vpaidSettings: .init(document: testUrl),
Expand Down
1 change: 1 addition & 0 deletions sources/video provider/VideoProviderResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extension VideoProvider.Response {
public let softTimeout: Double
public let hardTimeout: Double
public let startTimeout: Double
public let maxSearchTime: Double
public let maxDuration: Int
public let maxVASTWrapperRedirectCount: Int
}
Expand Down
1 change: 1 addition & 0 deletions sources/video provider/provider/VideoProviderParsing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extension VideoProvider.Parse {
softTimeout: json.parse("softTimeout"),
hardTimeout: json.parse("hardTimeout"),
startTimeout: json.parse("startTimeout"),
maxSearchTime: json.parse("maxSearchTime"),
maxDuration: json.parse("maxShowTime"),
maxVASTWrapperRedirectCount: json.parse("maxVASTWrapperRedirectCount"))
}
Expand Down
2 changes: 2 additions & 0 deletions sources/video provider/provider/VideoProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ class VideoProviderTests: XCTestCase {
"softTimeout" : 0.5,
"hardTimeout" : 2.5,
"startTimeout": 3.5,
"maxSearchTime" : 9.0,
"maxShowTime": 90,
"maxVASTWrapperRedirectCount": 3,
]
Expand Down Expand Up @@ -386,6 +387,7 @@ class VideoProviderTests: XCTestCase {
expect(value.adSettings.startTimeout) == 3.5
expect(value.adSettings.maxDuration) == 90
expect(value.adSettings.maxVASTWrapperRedirectCount) == 3
expect(value.adSettings.maxSearchTime) == 9.0

expect(try parse(VideoProviderTests.emptyResponse, .native)).to(throwError())
}
Expand Down