Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee committed Jul 24, 2024
1 parent 96c719e commit 5ce6ac0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import XCTest
final class AVPlayerExtensions: XCTestCase {
func testValidHLSVideoIdPlay() throws {
let observer = AVPlayerReadyObserverImpl(testCase: self)
_ = observer.readyExpectation
let ready = observer.readyExpectation

let avPlayer = AVPlayer(playerItem: nil)
avPlayer.replaceCurrentItem(withHls: VideoOptions(videoId: VideoId.validVideoId, videoType: .vod))
avPlayer.currentItem?.addObserver(observer, forKeyPath: "status", options: .new, context: nil)
avPlayer.play()

waitForExpectations(timeout: 10, handler: nil)
wait(for: [ready], timeout: 10)
avPlayer.currentItem?.removeObserver(observer, forKeyPath: "status")
}

Expand Down

0 comments on commit 5ce6ac0

Please sign in to comment.