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

Commit

Permalink
Merge pull request #45 from VerizonAdPlatforms/OMSDK-2152/parsing-of-…
Browse files Browse the repository at this point in the history
…max-ad-search-time

Added max ad search time parsing
  • Loading branch information
VladyslavAnokhin committed Jan 30, 2019
2 parents 79648d1 + 42af52a commit 1729155
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
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

0 comments on commit 1729155

Please sign in to comment.