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

App Crashes on full-screen button pressed for LANDSCAPE! #46

Closed
punkooz opened this issue Jul 30, 2019 · 11 comments
Closed

App Crashes on full-screen button pressed for LANDSCAPE! #46

punkooz opened this issue Jul 30, 2019 · 11 comments
Labels

Comments

@punkooz
Copy link

punkooz commented Jul 30, 2019

Hey,
Thanks for the package!

But there's an issue which is a very fundamental one:
The app functions nicely, until the ** Full-Screen Button for Landscape mode** is pressed

Actions to crash the app:
Open App --> Let the video play --> Press FullScreen Icon --> App Crashes

Request you to please look into the issue.
Any help is hugely appreciated!

Thanks.

@punkooz
Copy link
Author

punkooz commented Jul 30, 2019

V/AudioTrack(30277): obtainBuffer(754) returned 0 = 0 + 0 err -11 I/Choreographer(30277): Skipped 31 frames! The application may be doing too much work on its main thread. V/AudioTrack(30277): obtainBuffer(754) returned 3840 = 754 + 3086 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3086 = 650 + 2436 err 0 V/AudioTrack(30277): obtainBuffer(1272) returned 2436 = 1272 + 1164 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1164 = 1164 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1164 = 1164 + 0 err 0 V/AudioTrack(30277): obtainBuffer(758) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(758) returned 3840 = 758 + 3082 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3082 = 902 + 2180 err 0 V/AudioTrack(30277): obtainBuffer(1020) returned 2180 = 1020 + 1160 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1160 = 1160 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1160 = 1160 + 0 err 0 V/AudioTrack(30277): obtainBuffer(762) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(762) returned 3840 = 762 + 3078 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3078 = 1154 + 1924 err 0 V/AudioTrack(30277): obtainBuffer(768) returned 1924 = 768 + 1156 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1156 = 1156 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1156 = 1156 + 0 err 0 V/AudioTrack(30277): obtainBuffer(766) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(766) returned 3840 = 766 + 3074 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3074 = 1406 + 1668 err 0 V/AudioTrack(30277): obtainBuffer(516) returned 1668 = 516 + 1152 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1152 = 1152 + 0 err 0 W/ContentCatcher(30277): Failed to notify a WebView V/AudioTrack(30277): obtainBuffer(1922) returned 1152 = 1152 + 0 err 0 V/AudioTrack(30277): obtainBuffer(770) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(770) returned 3840 = 770 + 3070 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3070 = 1658 + 1412 err 0 V/AudioTrack(30277): obtainBuffer(264) returned 1412 = 264 + 1148 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1148 = 1148 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1148 = 1148 + 0 err 0 V/AudioTrack(30277): obtainBuffer(774) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(774) returned 2432 = 774 + 1658 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3066 = 1910 + 1156 err 0 V/AudioTrack(30277): obtainBuffer(12) returned 1156 = 12 + 1144 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1144 = 1144 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1144 = 1144 + 0 err 0 V/AudioTrack(30277): obtainBuffer(778) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(778) returned 3840 = 778 + 3062 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3062 = 1922 + 1140 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1140 = 240 + 900 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1140 = 240 + 900 err 0 V/AudioTrack(30277): obtainBuffer(1682) returned 900 = 900 + 0 err 0 V/AudioTrack(30277): obtainBuffer(782) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(782) returned 2944 = 782 + 2162 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3058 = 1922 + 1136 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1136 = 492 + 644 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1136 = 492 + 644 err 0 V/AudioTrack(30277): obtainBuffer(1430) returned 644 = 644 + 0 err 0 V/AudioTrack(30277): obtainBuffer(786) returned 0 = 0 + 0 err -11 W/ContentCatcher(30277): Failed to notify a WebView I/Adreno (30277): DequeueBuffer: dequeueBuffer failed V/AudioTrack(30277): obtainBuffer(786) returned 3840 = 786 + 3054 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3054 = 1922 + 1132 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1132 = 744 + 388 err 0 I/Adreno (30277): DequeueBuffer: dequeueBuffer failed I/Adreno (30277): DequeueBuffer: dequeueBuffer failed W/OpenGLRenderer(30277): swapBuffers encountered EGL error 12301 on 0x78dd1ff780, halting rendering... V/AudioTrack(30277): obtainBuffer(1922) returned 1132 = 744 + 388 err 0 V/AudioTrack(30277): obtainBuffer(1178) returned 388 = 388 + 0 err 0 V/AudioTrack(30277): obtainBuffer(790) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(790) returned 3840 = 790 + 3050 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3050 = 1922 + 1128 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1128 = 996 + 132 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1128 = 996 + 132 err 0 V/AudioTrack(30277): obtainBuffer(926) returned 132 = 132 + 0 err 0 V/AudioTrack(30277): obtainBuffer(794) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(794) returned 3840 = 794 + 3046 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3046 = 1922 + 1124 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1124 = 1124 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1124 = 1124 + 0 err 0 V/AudioTrack(30277): obtainBuffer(798) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(798) returned 3840 = 124 + 3716 err 0 V/AudioTrack(30277): obtainBuffer(674) returned 3716 = 674 + 3042 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3042 = 1922 + 1120 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1120 = 1120 + 0 err 0 W/AudioManager(30277): Use of stream types is deprecated for operations other than volume control W/AudioManager(30277): See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case V/AudioTrack(30277): obtainBuffer(1922) returned 1120 = 1120 + 0 err 0 V/AudioTrack(30277): obtainBuffer(802) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(802) returned 3840 = 380 + 3460 err 0 V/AudioTrack(30277): obtainBuffer(422) returned 3460 = 422 + 3038 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3038 = 1922 + 1116 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1116 = 1116 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1116 = 1116 + 0 err 0 V/AudioTrack(30277): obtainBuffer(806) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(806) returned 3840 = 636 + 3204 err 0 V/AudioTrack(30277): obtainBuffer(170) returned 3204 = 170 + 3034 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3034 = 1922 + 1112 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1112 = 1112 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1112 = 1112 + 0 err 0 V/AudioTrack(30277): obtainBuffer(810) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(810) returned 3840 = 810 + 3030 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3030 = 82 + 2948 err 0 V/AudioTrack(30277): obtainBuffer(1840) returned 2948 = 1840 + 1108 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1108 = 1108 + 0 err 0 I/flutter (30277): VideoData {"duration":266.461,"videoUrl":"https://www.youtube.com/watch?t=13&v=BBAyRBTfsOU","availableQualityLevels":["hd1080","hd720","large","medium","small","tiny","auto"],"videoEmbedCode":"<iframe width=\"100\" height=\"100\" src=\"https://www.youtube.com/embed/\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"} V/AudioTrack(30277): obtainBuffer(1922) returned 1108 = 1108 + 0 err 0 V/AudioTrack(30277): obtainBuffer(814) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(814) returned 3840 = 814 + 3026 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3026 = 334 + 2692 err 0 V/AudioTrack(30277): obtainBuffer(1588) returned 2692 = 1588 + 1104 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1104 = 1104 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1104 = 1104 + 0 err 0 V/AudioTrack(30277): obtainBuffer(818) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(818) returned 3840 = 818 + 3022 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3022 = 586 + 2436 err 0 V/AudioTrack(30277): obtainBuffer(1336) returned 2436 = 1336 + 1100 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1100 = 1100 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1100 = 1100 + 0 err 0 V/AudioTrack(30277): obtainBuffer(822) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(822) returned 3840 = 822 + 3018 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3018 = 838 + 2180 err 0 V/AudioTrack(30277): obtainBuffer(1084) returned 2180 = 1084 + 1096 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1096 = 1096 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1096 = 1096 + 0 err 0 V/AudioTrack(30277): obtainBuffer(826) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(826) returned 3840 = 826 + 3014 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3014 = 1090 + 1924 err 0 V/AudioTrack(30277): obtainBuffer(832) returned 1924 = 832 + 1092 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1092 = 1092 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1092 = 1092 + 0 err 0 V/AudioTrack(30277): obtainBuffer(830) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(830) returned 3840 = 830 + 3010 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3010 = 1342 + 1668 err 0 V/AudioTrack(30277): obtainBuffer(580) returned 1668 = 580 + 1088 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1088 = 1088 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1088 = 1088 + 0 err 0 V/AudioTrack(30277): obtainBuffer(834) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(834) returned 2176 = 834 + 1342 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1342 = 1342 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3006 = 1594 + 1412 err 0 V/AudioTrack(30277): obtainBuffer(328) returned 1412 = 328 + 1084 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1084 = 1084 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1084 = 1084 + 0 err 0 V/AudioTrack(30277): obtainBuffer(838) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(838) returned 3840 = 838 + 3002 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 3002 = 1846 + 1156 err 0 V/AudioTrack(30277): obtainBuffer(76) returned 1156 = 76 + 1080 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1080 = 1080 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1080 = 1080 + 0 err 0 V/AudioTrack(30277): obtainBuffer(842) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(842) returned 2688 = 842 + 1846 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2998 = 1922 + 1076 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1076 = 176 + 900 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1076 = 176 + 900 err 0 V/AudioTrack(30277): obtainBuffer(1746) returned 900 = 900 + 0 err 0 V/AudioTrack(30277): obtainBuffer(846) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(846) returned 3840 = 846 + 2994 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2994 = 1922 + 1072 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1072 = 428 + 644 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1072 = 428 + 644 err 0 V/AudioTrack(30277): obtainBuffer(1494) returned 644 = 644 + 0 err 0 V/AudioTrack(30277): obtainBuffer(850) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(850) returned 3840 = 850 + 2990 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2990 = 1922 + 1068 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1068 = 680 + 388 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1068 = 680 + 388 err 0 V/AudioTrack(30277): obtainBuffer(1242) returned 388 = 388 + 0 err 0 V/AudioTrack(30277): obtainBuffer(854) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(854) returned 3840 = 854 + 2986 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2986 = 1922 + 1064 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1064 = 932 + 132 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1064 = 932 + 132 err 0 V/AudioTrack(30277): obtainBuffer(990) returned 132 = 132 + 0 err 0 V/AudioTrack(30277): obtainBuffer(858) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(858) returned 3840 = 858 + 2982 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2982 = 1922 + 1060 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1060 = 1060 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1060 = 1060 + 0 err 0 V/AudioTrack(30277): obtainBuffer(862) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(862) returned 3840 = 124 + 3716 err 0 V/AudioTrack(30277): obtainBuffer(738) returned 3716 = 738 + 2978 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2978 = 1922 + 1056 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1056 = 1056 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1056 = 1056 + 0 err 0 V/AudioTrack(30277): obtainBuffer(866) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(866) returned 3840 = 380 + 3460 err 0 V/AudioTrack(30277): obtainBuffer(486) returned 3460 = 486 + 2974 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2974 = 1922 + 1052 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1052 = 1052 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1052 = 1052 + 0 err 0 V/AudioTrack(30277): obtainBuffer(870) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(870) returned 3840 = 636 + 3204 err 0 V/AudioTrack(30277): obtainBuffer(234) returned 3204 = 234 + 2970 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2970 = 1922 + 1048 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1048 = 1048 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1048 = 1048 + 0 err 0 V/AudioTrack(30277): obtainBuffer(874) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(874) returned 3840 = 874 + 2966 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2966 = 18 + 2948 err 0 V/AudioTrack(30277): obtainBuffer(1904) returned 2948 = 1904 + 1044 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1044 = 1044 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1044 = 1044 + 0 err 0 V/AudioTrack(30277): obtainBuffer(878) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(878) returned 3840 = 878 + 2962 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2962 = 270 + 2692 err 0 V/AudioTrack(30277): obtainBuffer(1652) returned 2692 = 1652 + 1040 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1040 = 1040 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1040 = 1040 + 0 err 0 V/AudioTrack(30277): obtainBuffer(882) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(882) returned 3840 = 882 + 2958 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2958 = 522 + 2436 err 0 V/AudioTrack(30277): obtainBuffer(1400) returned 2436 = 1400 + 1036 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1036 = 1036 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1036 = 1036 + 0 err 0 V/AudioTrack(30277): obtainBuffer(886) returned 0 = 0 + 0 err -11 W/ContentCatcher(30277): Failed to notify a WebView V/AudioTrack(30277): obtainBuffer(886) returned 3840 = 886 + 2954 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2954 = 774 + 2180 err 0 V/AudioTrack(30277): obtainBuffer(1148) returned 2180 = 1148 + 1032 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1032 = 1032 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1032 = 1032 + 0 err 0 V/AudioTrack(30277): obtainBuffer(890) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(890) returned 3840 = 890 + 2950 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2950 = 1026 + 1924 err 0 V/AudioTrack(30277): obtainBuffer(896) returned 1924 = 896 + 1028 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1028 = 1028 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1028 = 1028 + 0 err 0 V/AudioTrack(30277): obtainBuffer(894) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(894) returned 3840 = 894 + 2946 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2946 = 1278 + 1668 err 0 V/AudioTrack(30277): obtainBuffer(644) returned 1668 = 644 + 1024 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1024 = 1024 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1024 = 1024 + 0 err 0 V/AudioTrack(30277): obtainBuffer(898) returned 0 = 0 + 0 err -11 V/AudioTrack(30277): obtainBuffer(898) returned 2176 = 898 + 1278 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 2942 = 1530 + 1412 err 0 V/AudioTrack(30277): obtainBuffer(392) returned 1412 = 392 + 1020 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1020 = 1020 + 0 err 0 V/AudioTrack(30277): obtainBuffer(1922) returned 1020 = 1020 + 0 err 0 V/AudioTrack(30277): obtainBuffer(902) returned 0 = 0 + 0 err -11 D/ (30277): PlayerBase::stop() from IPlayer D/AudioTrack(30277): stop() called with 869764 frames delivered V/AudioTrack(30277): obtainBuffer(902) returned 0 = 0 + 0 err -4 W/AudioManager(30277): Use of stream types is deprecated for operations other than volume control W/AudioManager(30277): See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case I/Choreographer(30277): Skipped 36 frames! The application may be doing too much work on its main thread. W/ContentCatcher(30277): Failed to notify a WebView D/AndroidRuntime(30277): Shutting down VM E/AndroidRuntime(30277): FATAL EXCEPTION: main E/AndroidRuntime(30277): Process: np.com.sarbagyastha.youtube_player_flutter_example, PID: 30277 E/AndroidRuntime(30277): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayAdjustments android.view.Display.getDisplayAdjustments()' on a null object reference E/AndroidRuntime(30277): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1761) E/AndroidRuntime(30277): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1505) E/AndroidRuntime(30277): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7354) E/AndroidRuntime(30277): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1092) E/AndroidRuntime(30277): at android.view.Choreographer.doCallbacks(Choreographer.java:888) E/AndroidRuntime(30277): at android.view.Choreographer.doFrame(Choreographer.java:819) E/AndroidRuntime(30277): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1078) E/AndroidRuntime(30277): at android.os.Handler.handleCallback(Handler.java:873) E/AndroidRuntime(30277): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(30277): at android.os.Looper.loop(Looper.java:201) E/AndroidRuntime(30277): at android.app.ActivityThread.main(ActivityThread.java:6810) E/AndroidRuntime(30277): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(30277): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) E/AndroidRuntime(30277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) I/Process (30277): Sending signal. PID: 30277 SIG: 9 Lost connection to device.

@punkooz
Copy link
Author

punkooz commented Jul 30, 2019

The Error ☝️

@punkooz punkooz changed the title App Crashes on orientation change to LANDSCAPE! & Vice-Versa App Crashes on full-screen button pressed for LANDSCAPE! Jul 30, 2019
@punkooz
Copy link
Author

punkooz commented Jul 30, 2019

`import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:youtube_player_flutter/youtube_player_flutter.dart';

void main() {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Color(0xFFFF0000),
));
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Youtube Player Demo',
theme: ThemeData(
brightness: Brightness.dark,
primarySwatch: Colors.red,
appBarTheme: AppBarTheme(color: Color(0xFFFF0000)),
scaffoldBackgroundColor: Colors.black,
),
home: MyHomePage(title: 'Youtube Player Demo'),
);
}
}

class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;

@OverRide
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
YoutubePlayerController _controller = YoutubePlayerController();
var _idController = TextEditingController();
var _seekToController = TextEditingController();
double _volume = 100;
bool _muted = false;
String _playerStatus = "";
String _errorCode = '0';

String _videoId = "BBAyRBTfsOU";

void listener() {
if (_controller.value.playerState == PlayerState.ENDED) {
_showThankYouDialog();
}
setState(() {
_playerStatus = _controller.value.playerState.toString();
_errorCode = _controller.value.errorCode.toString();
});
}

@OverRide
void deactivate() {
// This pauses video while navigating to next page.
_controller.pause();
super.deactivate();
}

@OverRide
Widget build(BuildContext context) {
return SafeArea(
child: YoutubeScaffold(
fullScreenOnOrientationChange: true,
child: Scaffold(

      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            YoutubePlayer(
              context: context,
              videoId: _videoId,
              flags: YoutubePlayerFlags(
                mute: false,
                autoPlay: false,
                forceHideAnnotation: true,
                showVideoProgressIndicator: true,
                disableDragSeek: false,
              ),
              videoProgressIndicatorColor: Color(0xFFFF0000),
              actions: <Widget>[
                IconButton(
                  icon: Icon(
                    Icons.arrow_back_ios,
                    color: Colors.white,
                    size: 20.0,
                  ),
                  onPressed: () {},
                ),
                Text(
                  'Hello! This is a test title.',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 18.0,
                  ),
                ),
                Spacer(),
                IconButton(
                  icon: Icon(
                    Icons.settings,
                    color: Colors.white,
                    size: 25.0,
                  ),
                  onPressed: () {},
                ),
              ],
              progressColors: ProgressColors(
                playedColor: Color(0xFFFF0000),
                handleColor: Color(0xFFFF4433),
              ),
              onPlayerInitialized: (controller) {
                _controller = controller;
                _controller.addListener(listener);
              },
            ),
            SizedBox(
              height: 10.0,
            ),
            /* Padding(
              padding: EdgeInsets.all(8.0),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.stretch,
                children: <Widget>[
                  TextFormField(
                    controller: _idController,
                    decoration: InputDecoration(
                        border: OutlineInputBorder(),
                        hintText: "Enter youtube \<video id\> or \<link\>"),
                  ),
                  SizedBox(
                    height: 10.0,
                  ),
                  InkWell(
                    onTap: () {
                      setState(() {
                        _videoId = _idController.text;
                        // If text is link then converting to corresponding id.
                        if (_videoId.contains("http"))
                          _videoId = YoutubePlayer.convertUrlToId(_videoId);
                      });
                    },
                    child: Container(
                      padding: EdgeInsets.symmetric(
                        vertical: 16.0,
                      ),
                      color: Color(0xFFFF0000),
                      child: Text(
                        "PLAY",
                        style: TextStyle(fontSize: 18.0, color: Colors.white),
                        textAlign: TextAlign.center,
                      ),
                    ),
                  ),
                  SizedBox(
                    height: 10.0,
                  ),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      IconButton(
                        icon: Icon(
                          _controller.value.isPlaying
                              ? Icons.play_arrow
                              : Icons.pause,
                        ),
                        onPressed: () {
                          _controller.value.isPlaying
                              ? _controller.pause()
                              : _controller.play();
                          setState(() {});
                        },
                      ),
                      IconButton(
                        icon:
                            Icon(_muted ? Icons.volume_off : Icons.volume_up),
                        onPressed: () {
                          _muted ? _controller.unMute() : _controller.mute();
                          setState(() {
                            _muted = !_muted;
                          });
                        },
                      ),
                      IconButton(
                        icon: Icon(Icons.fullscreen),
                        onPressed: () => _controller.enterFullScreen(),
                      ),
                    ],
                  ),
                  SizedBox(
                    height: 10.0,
                  ),
                  TextField(
                    controller: _seekToController,
                    keyboardType: TextInputType.number,
                    decoration: InputDecoration(
                      border: OutlineInputBorder(),
                      hintText: "Seek to seconds",
                      suffixIcon: Padding(
                        padding: EdgeInsets.all(5.0),
                        child: OutlineButton(
                          child: Text("Seek"),
                          onPressed: () => _controller.seekTo(
                                Duration(
                                  seconds: int.parse(_seekToController.text),
                                ),
                              ),
                        ),
                      ),
                    ),
                  ),
                  SizedBox(
                    height: 10.0,
                  ),
                  Row(
                    children: <Widget>[
                      Text(
                        "Volume",
                        style: TextStyle(fontWeight: FontWeight.w300),
                      ),
                      Expanded(
                        child: Slider(
                          inactiveColor: Colors.transparent,
                          value: _volume,
                          min: 0.0,
                          max: 100.0,
                          divisions: 10,
                          label: '${(_volume).round()}',
                          onChanged: (value) {
                            setState(() {
                              _volume = value;
                            });
                            _controller.setVolume(_volume.round());
                          },
                        ),
                      ),
                    ],
                  ),
                  Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      "Status: $_playerStatus",
                      style: TextStyle(
                        fontWeight: FontWeight.w300,
                      ),
                      textAlign: TextAlign.center,
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.all(8.0),
                    child: Text(
                      "Error Code: $_errorCode",
                      style: TextStyle(
                        fontWeight: FontWeight.w300,
                      ),
                      textAlign: TextAlign.center,
                    ),
                  ),
                ],
              ),
            ), */
          ],
        ),
      ),
    ),
  ),
);

}

void _showThankYouDialog() {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Video Ended"),
content: Text("Thank you for trying the plugin!"),
);
},
);
}
}
`

@punkooz
Copy link
Author

punkooz commented Jul 30, 2019

The Code. ☝️

@punkooz
Copy link
Author

punkooz commented Jul 30, 2019

Note: The App also crashes on multiple Orientation Changes

@sarbagyastha
Copy link
Owner

@punkooz What's your device brand and model ? There's a bug in flutter for chinese device mnufacturer regarding Platform Views. There's also a PR for it. This crashing issue will only fix after the PR rolls into Flutter engine.

@sarbagyastha sarbagyastha added the bug Something isn't working label Aug 12, 2019
@punkooz
Copy link
Author

punkooz commented Aug 24, 2019

Device:
Redmi Note6 Pro

Any workaround till the bug gets fixed?

@gusargentina
Copy link

I'm having the exact same issue with a Samsung S8+ , Android v9, youtube_player_flutter: ^4.1.0

@sarbagyastha
Copy link
Owner

There's no workaround currently. Fixed the fullscreen mechanism with Version 5 to minimize the crash.

@sarbagyastha sarbagyastha added fixed and removed bug Something isn't working labels Nov 2, 2019
@sarbagyastha
Copy link
Owner

Finally fixed with Version 6.0.0.

@mayurdhurpate
Copy link

Just received a similar error on Version 6.0.3+2 while playing Youtube Video on a Redmi device.
Some of the device details:
image

Causes a fatal crash and a lot of bad reviews and churn of our users. Please help.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayAdjustments android.view.Display.getDisplayAdjustments()' on a null object reference
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1783)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1527)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7394)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1036)
       at android.view.Choreographer.doCallbacks(Choreographer.java:832)
       at android.view.Choreographer.doFrame(Choreographer.java:767)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022)
       at android.os.Handler.handleCallback(Handler.java:873)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:201)
       at android.app.ActivityThread.main(ActivityThread.java:6810)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants