-
Notifications
You must be signed in to change notification settings - Fork 6
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: Add now playing info for video #1324
base: master
Are you sure you want to change the base?
Conversation
696ce86
to
c92cac3
Compare
915becc
to
5a6c505
Compare
5a6c505
to
b2e12e0
Compare
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.
You only observe .AVPlayerItemDidPlayToEndTime
.
This only set the correct metadata at the end of the track.
Maybe try to also remove MPMediaItemPropertyPlaybackDuration
and MPNowPlayingInfoPropertyElapsedPlaybackTime
because they should be set by the VideoPlayer
ba1c29c
to
0181d06
Compare
There's always the problem that the video title appears for 1 second and then disappears in the notfication. I'm open to an idea! |
1d83e16
to
a4fb80a
Compare
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.
I'll check the 1 second and then disappears
asap.
I'll check the "Title jumps glitch" asap
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.
I have a couple of small remarks regarding the VideoPlayer
.
I don't think your branch can build right now. We usually try to have branches that can build even if the app is broken.
import MediaPlayer | ||
import UIKit | ||
|
||
class VideoPlayer { |
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.
Since VideoPlayer
is now in Core
you need to make it a public type.
You could build a protocol with all the public properties you want to use from the outside.
} | ||
|
||
@IBAction func playVideoPressed(_ sender: Any) { | ||
guard let player else { return } | ||
guard let player = videoPlayer?.avPlayer else { |
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.
I'm not found of exposing directly the AVPlayer in the cell.
It goes against encapsulation, I would rather use a mechanism for decoupling (like Combine in the SingleTrackPlayer)
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.
Discussed, you can use this in VideoPlayer
to remove the property avPlayer
public lazy var playerViewController: AVPlayerViewController = {
let playerViewController = AVPlayerViewController()
playerViewController.player = self.player
return playerViewController
}()
} | ||
} | ||
|
||
private func presentVideoPlayer(navController: VideoPlayerNavigationController, |
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 looks like it is an unused method. Should we remove it ?
As a "nice to have", we could also set a thumbnail. We already have one, it should be straight forward. |
return player.currentTime().seconds / currentItem.duration.seconds | ||
} | ||
|
||
init(file: File, driveFileManager: DriveFileManager) { |
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.
init(file: File, driveFileManager: DriveFileManager) { | |
init(frozenFile: File, driveFileManager: DriveFileManager) { |
It looks like we use a frozenFile
, therefore you can rename the parameter.
1c00484
to
3bd12ae
Compare
Quality Gate failedFailed conditions |
No description provided.