-
Notifications
You must be signed in to change notification settings - Fork 16
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
[iOS] Completion doesn't work for videos in PiP mode. #414
[iOS] Completion doesn't work for videos in PiP mode. #414
Conversation
@forgotvas I just noticed that even though the video is still playing in PiP mode, when I return from other screens, it appears as if the module has been completed. PiP.Mode.Video.mov |
I came across this code snippet, and it appears to be functioning as intended, so there's no need to make any changes to it. 🎉
|
@forgotvas I'm curious to understand what happens if a user downloads a video and watches it offline. Does the system recognize it as complete once the user reconnects online? |
init(playerController: AVPlayerViewController) { | ||
self.playerController = playerController | ||
} |
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 believe we can safely remove this initializer.
} | ||
} |
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.
Trailing Whitespace Violation
.store(in: &cancellations) | ||
|
||
|
||
NotificationCenter.default.publisher(for: AVPlayerItem.didPlayToEndTimeNotification, object: player?.currentItem) |
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.
Vertical Whitespace Violation
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.
Typo: SubtittlesView
to SubtitlesView
Hi @shafqat-muneer, you are right, it will try to call the completion request, but as we are offline it will not be send. Also in current implementation i don't see that we are syncing it after return to online mode. But that PR is fixing problem when we call completion for videos what you are playing in PIP mode, to solve offline sync we need to create another task & PR. @sergeymomot could create ticket for that. I have fixed code that you requested to change. Thank you for review. |
@forgotvas It makes sense to me. I've looked over the requested changes, and we are good to merge. 🎉 |
Fix bug for:
[iOS] Completion doesn't work for videos in PiP mode. #391
A little refactor how players is build in.