Skip to content

Commit

Permalink
Merge pull request media-kit#475 from NotAgentBilly/fix-idle-gpu
Browse files Browse the repository at this point in the history
fix: High gpu usage during idle
  • Loading branch information
alexmercerind authored Sep 13, 2023
2 parents ac33638 + c0ac4d5 commit 8926ede
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -942,10 +942,18 @@ class _MaterialVideoControlsState extends State<_MaterialVideoControls> {
child: _theme(context)
.bufferingIndicatorBuilder
?.call(context) ??
const Center(
child: CircularProgressIndicator(
color: Color(0xFFFFFFFF),
),
TweenAnimationBuilder<double>(
tween: Tween<double>(begin: 0.4, end: 1.0),
duration: _theme(context)
.controlsTransitionDuration, // adjust as needed
builder: (BuildContext context, double value,
Widget? child) {
return Center(
child: CircularProgressIndicator(
value: buffering ? null : value,
color: const Color(0xFFFFFFFF),
));
},
),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,20 @@ class _MaterialDesktopVideoControlsState
child: _theme(context)
.bufferingIndicatorBuilder
?.call(context) ??
const Center(
child: CircularProgressIndicator(
color: Color(0xFFFFFFFF),
),
TweenAnimationBuilder<double>(
tween: Tween<double>(
begin: 0.4, end: 1.0),
duration: _theme(context)
.controlsTransitionDuration, // adjust as needed
builder: (BuildContext context,
double value, Widget? child) {
return Center(
child:
CircularProgressIndicator(
value: buffering ? null : value,
color: const Color(0xFFFFFFFF),
));
},
),
),
),
Expand Down

0 comments on commit 8926ede

Please sign in to comment.