-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[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
Changes from 6 commits
fed4658
f688bdb
3c60307
46ea3e9
74b02a4
dffa3a4
742e1b5
263bdc5
04f9b57
15d7d64
b30287e
2b353a9
da08c54
6353082
1e1f173
5a42c83
0bd9c68
4839f96
75f86c6
cdfc331
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 | ||
|
Contributor
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. 2.10.0 |
||
|
|
||
| * Implement screen auto-lock control for video playback. | ||
|
Contributor
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.
|
||
|
|
||
| ## 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, *)) { | ||
| self.player.preventsDisplaySleepDuringVideoPlayback = !allowScreenAutoLock; | ||
|
Contributor
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.
|
||
| } | ||
|
shrabanti722 marked this conversation as resolved.
Outdated
|
||
| } | ||
|
|
||
| #pragma mark - Private | ||
|
|
||
| - (int64_t)duration { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| ## NEXT | ||
| ## 6.6.1 | ||
|
Contributor
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. 6.7.0 |
||
|
|
||
| * Implement screen auto-lock control for video playback. | ||
| * Updates minimum supported SDK version to Flutter 3.35/Dart 3.9. | ||
|
|
||
| ## 6.6.0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/video_player/ | |
| issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 | ||
| # NOTE: We strongly prefer non-breaking changes, even at the expense of a | ||
| # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes | ||
| version: 6.6.0 | ||
| version: 6.6.1 | ||
|
Contributor
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. 6.7.0 |
||
|
|
||
| environment: | ||
| sdk: ^3.9.0 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.