Skip to content
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

Audio is running when pop page or naviagte page. #344

Open
spporan opened this issue Aug 24, 2020 · 1 comment
Open

Audio is running when pop page or naviagte page. #344

spporan opened this issue Aug 24, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@spporan
Copy link

spporan commented Aug 24, 2020

Describe the bug
When pop out from video page then didn't stop audio. When i dispose controller then throw an error. Actually not working dispose.

[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(error, java.lang.Integer cannot be cast to java.util.Map, null)
E/flutter (17421): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7)
E/flutter (17421): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18)
E/flutter (17421):
E/flutter (17421): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
E/flutter (17421): #3 AndroidViewController.dispose (package:flutter/src/services/platform_views.dart:534:43)
E/flutter (17421): #4 _AndroidViewState.dispose (package:flutter/src/widgets/platform_view.dart:494:17)
E/flutter (17421): #5 StatefulElement.unmount (package:flutter/src/widgets/framework.dart:4773:12)
E/flutter (17421): #6 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1935:13)
E/flutter (17421): #7 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #8 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4600:14)
E/flutter (17421): #9 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #10 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #11 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5861:14)
E/flutter (17421): #12 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #13 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #14 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4600:14)
E/flutter (17421): #15 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #16 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #17 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5861:14)
E/flutter (17421): #18 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #19 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #20 MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5973:16)
E/flutter (17421): #21 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #22 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #23 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5861:14)
E/flutter (17421): #24 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #25 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #26 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5861:14)
E/flutter (17421): #27 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #28 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #29 SingleChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:5861:14)
E/flutter (17421): #30 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #31 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #32 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4600:14)
E/flutter (17421): #33 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #34 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #35 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4600:14)
E/flutter (17421): #36 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:1931:13)
E/flutter (17421): #37 _InactiveElements._unmount. (package:flutter/src/widgets/framework.dart:1933:7)
E/flutter (17421): #38 ComponentElement.visitChildren (package:flutter/src/widgets/framework.dart:4600:14)
E/flutter (17421): #39 _InactiveElements._unmount (package:flutter/src/widgets/framework.dart:193
I/flutter (17421): A YoutubePlayerController was used after being disposed.
I/flutter (17421): Once you have called dispose() on a YoutubePlayerController, it can no longer be used.
V/AudioTrack(17421): obtainBuffer(244) returned 3840 = 244 + 3596 err 0
V/AudioTrack(17421): obtainBuffer(1922) returned 3596 = 1922 + 1674 err 0
I/flutter (17421): A YoutubePlayerController was used after being disposed.
I/flutter (17421): Once you have called dispose() on a YoutubePlayerController, it can no longer be used.

@spporan spporan added the bug Something isn't working label Aug 24, 2020
@freitas-patrick
Copy link

As workaround, i think that using a VisibilityDetector widget, it's gonna solved your problem temporary. Its use is described in this topic of StackOverflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants