Skip to content

Commit

Permalink
chore: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier committed Jan 28, 2024
1 parent 63a4fac commit b9c18d7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH

/// Tracks notifications is handled here.
override func observeValue(forKeyPath keyPath: String?,

Check failure on line 252 in ios/Video/RCTVideo.swift

View workflow job for this annotation

GitHub Actions / Swift-Lint

Block Based KVO Violation: Prefer the new block based KVO API with keypaths when using Swift 3.2 or later (block_based_kvo)
of object: Any?,
change: [NSKeyValueChangeKey : Any]?,
context: UnsafeMutableRawPointer?) {
of _: Any?,
change _: [NSKeyValueChangeKey: Any]?,
context _: UnsafeMutableRawPointer?) {
if keyPath == #keyPath(AVPlayerItem.tracks) {
all(RCTVideoUtils.getAudioTrackInfo(self._player), RCTVideoUtils.getTextTrackInfo(self._player)).then { audioTracks, textTracks in
self.onTextTracks?(["textTracks": textTracks])
Expand Down Expand Up @@ -381,9 +381,9 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH

// observe tracks update
self._player?.currentItem?.addObserver(self,
forKeyPath: #keyPath(AVPlayerItem.tracks),
options: [.old, .new],
context: nil)
forKeyPath: #keyPath(AVPlayerItem.tracks),
options: [.old, .new],
context: nil)
self._playerObserver.player = self._player
self.applyModifiers()
self._player?.actionAtItemEnd = .none
Expand Down

0 comments on commit b9c18d7

Please sign in to comment.