-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: save playback speed #67
Conversation
@@ -84,6 +85,19 @@ public class PlayerViewControllerHolder: PlayerViewControllerHolderProtocol { | |||
playerController.delegate = playerDelegate | |||
playerController.player = playerTracker.player as? AVPlayer | |||
playerController.player?.currentItem?.preferredMaximumResolution = videoResolution | |||
|
|||
let storage = Container.shared.resolve(CourseStorage.self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make it as injection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -11,6 +11,7 @@ import Core | |||
public protocol CourseStorage { | |||
var allowedDownloadLargeFile: Bool? { get set } | |||
var userSettings: UserSettings? { get set } | |||
var videoPlaybackSpeed: Float? {get set} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better to move it to UserSettings
where we have streamingQuality
option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a separate setting for this at the profile/settings level. It can only be changed in the video player. I don't think we need to mix this with the settings object. Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if we could group all the user settings regardless of their place of usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. please re-check
self.pipManager = pipManager | ||
self.playerTracker = playerTracker | ||
self.playerService = playerService | ||
let youtubePlayer = playerTracker.player as? YouTubePlayer | ||
var configuration = youtubePlayer?.configuration | ||
configuration?.autoPlay = !pipManager.isPipActive | ||
configuration?.fullscreenMode = .web |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rnr Is this change relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@saeedbashir it's not relevant to playback speed. It adds fullscreen for iPad. Update PR description.
Thank you
* chore: save playback speed in CourseStorage * chore: add full screen for youtube on iPad * chore: save value in userdefaults * chore: little refactor * fix: fix warning * chore: added CourseStorage as injection * chore: moved playback speed to user settings --------- Co-authored-by: Anton Yarmolenko <[email protected]>
* chore: save playback speed in CourseStorage * chore: add full screen for youtube on iPad * chore: save value in userdefaults * chore: little refactor * fix: fix warning * chore: added CourseStorage as injection * chore: moved playback speed to user settings --------- Co-authored-by: Anton Yarmolenko <[email protected]>
* fix: video tab with youtube (#52) * fix: don't show error if only youtube videos * fix: call UI updates from main queue * fix: don't send completion at youtube video start --------- Co-authored-by: Anton Yarmolenko <[email protected]> * chore: delete unneeded MainActor instructions * feat: save playback speed (#67) * chore: save playback speed in CourseStorage * chore: add full screen for youtube on iPad * chore: save value in userdefaults * chore: little refactor * fix: fix warning * chore: added CourseStorage as injection * chore: moved playback speed to user settings --------- Co-authored-by: Anton Yarmolenko <[email protected]> * chore: analytics screen events improvements and name fixes (#76) * chore: fix tests --------- Co-authored-by: Anton Yarmolenko <[email protected]> Co-authored-by: Saeed Bashir <[email protected]>
This PR adds playback speed preservation for native videos. Also it adds fullscreen mode for YouTube videos for iPad
From doc
RPReplay_Final1721741975.MP4