Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#3064 from Sunbreak/fix-current-time
Browse files Browse the repository at this point in the history
fix: remove undocumented currentTime property
  • Loading branch information
freeboub authored Apr 5, 2023
2 parents b575e3d + 2ef2b8e commit d5f12b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### Version 6.0.0-alpha.6

- iOS: remove undocumented `currentTime` property [#3064](https://github.com/react-native-video/react-native-video/pull/3064)

### Version 6.0.0-alpha.5

- iOS: ensure controls are not displayed when disabled by user [#3017](https://github.com/react-native-video/react-native-video/pull/3017)
Expand Down
1 change: 0 additions & 1 deletion Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ Video.propTypes = {
disableBuffering: PropTypes.bool,
controls: PropTypes.bool,
audioOnly: PropTypes.bool,
currentTime: PropTypes.number,
fullscreenAutorotate: PropTypes.bool,
fullscreenOrientation: PropTypes.oneOf(['all', 'landscape', 'portrait']),
progressUpdateInterval: PropTypes.number,
Expand Down
14 changes: 4 additions & 10 deletions ios/Video/RCTVideo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,6 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
_paused = paused
}

@objc
func setCurrentTime(_ currentTime:Float) {
let info:NSDictionary = [
"time": NSNumber(value: currentTime),
"tolerance": NSNumber(value: 100)
]
setSeek(info)
}

@objc
func setSeek(_ info:NSDictionary!) {
let seekTime:NSNumber! = info["time"] as! NSNumber
Expand Down Expand Up @@ -1009,7 +1000,10 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
}

if _pendingSeek {
setCurrentTime(_pendingSeekTime)
setSeek([
"time": NSNumber(value: _pendingSeekTime),
"tolerance": NSNumber(value: 100)
])
_pendingSeek = false
}

Expand Down
1 change: 0 additions & 1 deletion ios/Video/RCTVideoManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ @interface RCT_EXTERN_MODULE(RCTVideoManager, RCTViewManager)
RCT_EXPORT_VIEW_PROPERTY(mixWithOthers, NSString);
RCT_EXPORT_VIEW_PROPERTY(rate, float);
RCT_EXPORT_VIEW_PROPERTY(seek, NSDictionary);
RCT_EXPORT_VIEW_PROPERTY(currentTime, float);
RCT_EXPORT_VIEW_PROPERTY(fullscreen, BOOL);
RCT_EXPORT_VIEW_PROPERTY(fullscreenAutorotate, BOOL);
RCT_EXPORT_VIEW_PROPERTY(fullscreenOrientation, NSString);
Expand Down

0 comments on commit d5f12b9

Please sign in to comment.