-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[video_player] Implement screen auto-lock control for video playback #11225
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
fed4658
f688bdb
3c60307
46ea3e9
74b02a4
dffa3a4
742e1b5
263bdc5
04f9b57
15d7d64
b30287e
2b353a9
da08c54
6353082
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ## 2.9.5 | ||
|
|
||
| * Implement screen auto-lock control for video playback. | ||
|
||
|
|
||
| ## 2.9.4 | ||
|
|
||
| * Ensures that the display link does not continue requesting frames after a player is disposed. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,6 +508,12 @@ - (void)selectAudioTrackAtIndex:(NSInteger)trackIndex | |
| } | ||
| } | ||
|
|
||
| - (void)setAllowScreenAutoLock:(BOOL)allowScreenAutoLock error:(FlutterError *_Nullable *_Nonnull)error { | ||
| if (@available(iOS 12.0, macOS 10.14, *)) { | ||
| self.player.preventsDisplaySleepDuringVideoPlayback = !allowScreenAutoLock; | ||
|
||
| } | ||
| } | ||
|
|
||
| #pragma mark - Private | ||
|
|
||
| - (int64_t)duration { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ name: video_player_avfoundation | |
| description: iOS and macOS implementation of the video_player plugin. | ||
| repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation | ||
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 | ||
| version: 2.9.4 | ||
| version: 2.9.5 | ||
|
|
||
| environment: | ||
| sdk: ^3.10.0 | ||
|
|
@@ -36,3 +36,9 @@ dev_dependencies: | |
| topics: | ||
| - video | ||
| - video-player | ||
|
|
||
| # FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. | ||
| # See https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changing-federated-plugins | ||
| dependency_overrides: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the repository style guide, temporary References
|
||
| video_player_platform_interface: {path: ../../../packages/video_player/video_player_platform_interface} | ||
|
|
||
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.
According to the repository style guide, temporary
dependency_overridesshould be accompanied by a comment to prevent them from being merged. Please add the comment# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE.before thedependency_overrides:block.References
dependency_overridessections inpubspec.yamlfiles should include a comment starting with 'FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE.' to prevent accidental merging. This override is missing the required comment. (link)