Youtube_player_flutter: [BUG] Opsi layar penuh tidak berfungsi...

Dibuat pada 1 Jun 2020  Β·  38Komentar  Β·  Sumber: sarbagyastha/youtube_player_flutter

Saya menerapkan ini ke salah satu aplikasi saya dan layar penuh tidak berfungsi.
Saya bahkan mencoba cuplikan contoh yang disediakan di example/lib/main.dart tetapi log yang sama terjadi

Ini lognya

I/PressGestureDetector(5303): ORIENTATION_LANDSCAPE
W/libEGL ( 5303): EGLNativeWindowType 0x7204703010 putuskan sambungan gagal
D/mali_winsys( 5303): EGLint new_window_surface(egl_winsys_display , void *, EGLSurface, EGLConfig, egl_winsys_surface * , egl_color_buffer_format *, EGLBoolean) mengembalikan 0x3000
W/PlatformViewsController( 5303): Membuat tampilan virtual dengan ukuran: [2040, 1080] dapat mengakibatkan masalah(https://github.com/flutter/flutter/issues/2897). Ini lebih besar dari ukuran layar perangkat: [1080, 2040].

Perangkat:
Kehormatan 9i
Android 8.0

bug

Komentar yang paling membantu

yup saya membungkus pemutar youtube di dalam pembuat pemutar youtube dan saya bahkan menggunakan kode contoh Anda dan itu memberi saya kesalahan yang sama

ketika saya mengklik tombol layar penuh, itu mengisi layar dengan warna hitam selama sepersekian detik dan kemudian masuk ke mode potret aslinya dan pemutar youtube berhenti

Semua 38 komentar

Apakah macet atau tidak beralih ke layar penuh?

Tidak, itu tidak merusak aplikasi tetapi tidak beralih ke layar penuh .. terima kasih atas balasan cepatnya

Bisakah Anda menjelaskan lebih lanjut tentang apa yang sebenarnya terjadi saat beralih ke mode layar penuh? Apakah Anda juga membungkus pemutar Anda dengan YoutubePlayerBuilder ?

yup saya membungkus pemutar youtube di dalam pembuat pemutar youtube dan saya bahkan menggunakan kode contoh Anda dan itu memberi saya kesalahan yang sama

ketika saya mengklik tombol layar penuh, itu mengisi layar dengan warna hitam selama sepersekian detik dan kemudian masuk ke mode potret aslinya dan pemutar youtube berhenti

Setelah pembaruan ke v7, layar penuh tidak berfungsi lagi. Saya membungkus komponen di YoutubePlayerBuilder tetapi tidak membantu. Ini dari log kesalahan:

Tried calling: value
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:53:5)
#1      _YoutubePlayerBuilderState.didChangeMetrics 
package:youtube_player_flutter/…/widgets/youtube_player_builder.dart:58
#2      WidgetsBinding.handleMetricsChanged 
package:flutter/…/widgets/binding.dart:538
#3      _rootRun  (dart:async/zone.dart:1184:13)
#4      _CustomZone.run  (dart:async/zone.dart:1077:19)
#5      _CustomZone.runGuarded  (dart:async/zone.dart:979:7)
#6      _invoke  (dart:ui/hooks.dart:261:10)
#7      _updateWindowMetrics  (dart:ui/hooks.dart:64:3)

@AshutoshPatole apakah Anda memutar video di Dialog? Karena itu persis terjadi pada saya ketika saya mencoba dari Dialog. Setelah saya beralih ke tata letak khusus untuk memutar video, itu berfungsi dengan baik. Ini kode saya:

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

class VideoView memperluas StatelessWidget {
String videoId akhir;
VideoView({this.videoId});
@mengesampingkan
Pembuatan widget (konteks BuildContext) {
YoutubePlayerController _controller = YoutubePlayerController(
initialVideoId: videoId,
bendera: YoutubePlayerFlags(
putar otomatis: benar,
),
);
pusat kembali (
anak: YoutubePlayerBuilder(
pemain: YoutubePlayer(
pengontrol: _pengontrol,
// showVideoProgressIndicator: benar,
), pembangun: (konteks , pemain ) {
kembali Kolom (
anak-anak:[
pemain,
],
);
},
),
);
}
}
`

@ vipinnegi90 tidak, saya tidak menggunakan dialog untuk menampilkan youtube dan saya juga mencoba kode Anda tetapi tidak berhasil dan menimbulkan kesalahan yang sama. apakah ada sesuatu dengan kode saya? tetapi id bekerja dengan sempurna sebelum memperbarui ke v7.xx, saya menempelkan teks log terperinci untuk menyelesaikan masalah ini.

Sunting 1: Saya baru menyadari bahwa kesalahan ini tidak ada hubungannya dengan kode saya. Saya membuat proyek flutter baru dan menambahkan hanya ketergantungan flutter_youtube_player dan menyalin kode yang diberikan dalam contoh hanya untuk memastikan itu berfungsi tetapi sekali lagi itu menimbulkan kesalahan yang sama. Saya bahkan mencoba ini di 2 ponsel yang berbeda.

kehormatan 9i => android 8.0
asus zenfone maxpro m1 => android 9.0

@sarbagyastha tolong perbaiki masalah ini dan ping saya jika Anda memerlukan informasi lebih lanjut dari saya.


Performing hot reload...
Syncing files to device RNE L22...
Reloaded 0 of 797 libraries in 486ms.
V/AudioManager(10229): playSoundEffect   effectType: 0
E/BufferQueueProducer(10229): [] Can not get hwsched service
D/HwCust  (10229): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="12">@ad0bded</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="13">@ad0bded</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
I/PressGestureDetector(10229): HiTouch restricted: AboardArea.
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/        (10229): TrackPlayerBase::~TrackPlayerBase()
D/        (10229): PlayerBase::~PlayerBase()
W/InputMethodManager(10229): startInputReason = 3
V/AudioManager(10229): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
V/AudioManager(10229): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
E/BufferQueueProducer(10229): [] Can not get hwsched service
D/        (10229): PlayerBase::PlayerBase()
D/        (10229): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(10229): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
I/cr_MediaCodecBridge(10229): create MediaCodec video decoder, mime video/avc
D/AudioTrack(10229): OFFLOAD 0,mNotificationFrames 0,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 48000,mTransfer 1
D/AudioTrack(10229): Client defaulted notificationFrames to 962 for frameCount 1924
I/OMXClient(10229): Treble IOmx obtained
I/ACodec  (10229): In onAllocateComponent create compenent, codec name: OMX.IMG.MSVDX.Decoder.AVC
I/MediaCodec(10229): MediaCodec will operate in async mode
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason connectToSurface
I/MediaCodec(10229): [OMX.IMG.MSVDX.Decoder.AVC] setting surface generation to 10474506
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason connectToSurface(reconnect)
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason connectToSurface(reconnect)
W/HwExtendedUtils(10229): hw configLocalPlayBack err = -1010
E/ACodec  (10229): [OMX.IMG.MSVDX.Decoder.AVC] setPortMode on output to DynamicANWBuffer failed w/ err -1010
W/ACodec  (10229): [OMX.IMG.MSVDX.Decoder.AVC] prepareForAdaptivePlayback failed w/ err -1010
I/HwExtendedCodec(10229): mime is [video/avc] at setVideoFormat
I/ACodec  (10229): onStart
I/HwExtendedUtils(10229): error setConfig queuesToNativeWindow (err -1010)
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): set up nativeWindow 0x72048ef010 for 960x720, color 0x300, rotation 0, usage 0x20002900
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
I/HwExtendedUtils(10229): error setConfig queuesToNativeWindow (err -1010)
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): set up nativeWindow 0x72048ef010 for 960x720, color 0x300, rotation 0, usage 0x20002900
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
V/AudioManager(10229): requestAudioFocus  streamType: 3  durationHint: 1
V/AudioManager(10229): registerAudioFocusListener...
E/chromium(10229): [ERROR:web_contents_delegate.cc(218)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
E/chromium(10229): [ERROR:web_contents_delegate.cc(218)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
W/cr_media(10229): Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO. No audio device will be available for recording
I/CameraManagerGlobal(10229): do not need hide aux camera, device number: 2
I/chatty  (10229): uid=10314(u0_a314) ThreadPoolSingl identical 10 lines
I/CameraManagerGlobal(10229): do not need hide aux camera, device number: 2
V/AudioManager(10229): playSoundEffect   effectType: 0
I/PressGestureDetector(10229): ORIENTATION_LANDSCAPE
I/PressGestureDetector(10229): ORIENTATION_LANDSCAPE
W/libEGL  (10229): EGLNativeWindowType 0x720487b010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (10229): EGLNativeWindowType 0x720487c010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (10229): EGLNativeWindowType 0x720487b010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (10229): EGLNativeWindowType 0x720487b010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (10229): EGLNativeWindowType 0x720487c010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/PlatformViewsController(10229): Creating a virtual display of size: [2160, 1080] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1080, 2040].
D/HwCust  (10229): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="14">@a4e8291</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="15">@a4e8291</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
I/PressGestureDetector(10229): HiTouch restricted: AboardArea.
D/AudioTrack(10229): stop() called with 561604 frames delivered
D/        (10229): PlayerBase::stop() from IPlayer
W/cr_MediaCodecBridge(10229): Releasing: OMX.IMG.MSVDX.Decoder.AVC
W/ACodec  (10229): forcing OMX state to Idle when received shutdown in ExecutingState
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason disconnectFromSurface
W/cr_MediaCodecBridge(10229): Codec released
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
V/AudioManager(10229): requestAudioFocus  streamType: 3  durationHint: 1
V/AudioManager(10229): registerAudioFocusListener...
V/AudioManager(10229): unregisterAudioFocusListener...
I/AudioManager(10229): abandonAudioFocus
W/libEGL  (10229): EGLNativeWindowType 0x720487c010 disconnect failed
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
D/HwCust  (10229): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="16">@fab94ef</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(10229): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="17">@fab94ef</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
I/PressGestureDetector(10229): HiTouch restricted: AboardArea.
I/zygote64(10229): Do partial code cache collection, code=1006KB, data=604KB
I/zygote64(10229): After code cache collection, code=1006KB, data=604KB
I/zygote64(10229): Increasing code cache capacity to 3MB
D/mali_winsys(10229): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(10229):   HWUI Binary is  enabled
V/AudioManager(10229): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
V/AudioManager(10229): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
E/BufferQueueProducer(10229): [] Can not get hwsched service
I/cr_MediaCodecBridge(10229): create MediaCodec video decoder, mime video/avc
I/OMXClient(10229): Treble IOmx obtained
I/ACodec  (10229): In onAllocateComponent create compenent, codec name: OMX.IMG.MSVDX.Decoder.AVC
I/MediaCodec(10229): MediaCodec will operate in async mode
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason connectToSurface
I/MediaCodec(10229): [OMX.IMG.MSVDX.Decoder.AVC] setting surface generation to 10474507
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason connectToSurface(reconnect)
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason connectToSurface(reconnect)
W/HwExtendedUtils(10229): hw configLocalPlayBack err = -1010
E/ACodec  (10229): [OMX.IMG.MSVDX.Decoder.AVC] setPortMode on output to DynamicANWBuffer failed w/ err -1010
W/ACodec  (10229): [OMX.IMG.MSVDX.Decoder.AVC] prepareForAdaptivePlayback failed w/ err -1010
I/HwExtendedCodec(10229): mime is [video/avc] at setVideoFormat
I/ACodec  (10229): onStart
I/HwExtendedUtils(10229): error setConfig queuesToNativeWindow (err -1010)
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): set up nativeWindow 0x72048ef010 for 960x720, color 0x300, rotation 0, usage 0x20002900
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
I/HwExtendedUtils(10229): error setConfig queuesToNativeWindow (err -1010)
D/SurfaceUtils(10229): disconnecting from surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): connecting to surface 0x72048ef010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(10229): set up nativeWindow 0x72048ef010 for 960x720, color 0x300, rotation 0, usage 0x20002900
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000
W/GrallocMapperPassthrough(10229): buffer descriptor with invalid usage bits 0x2000




@AshutoshPatole Bisakah Anda menguji dengan apks ini ?

@sarbagyastha yup itu berfungsi dengan baik tetapi mengapa ini tidak berhasil ketika saya menyalin kode yang sama dan mencoba menjalankan dalam mode debug?
bahkan dalam proyek baru yang hanya berisi pemutar youtube

Tolong berikan contoh yang dapat direproduksi sehingga saya bisa menguji. Tidak dapat melihat sesuatu yang mencurigakan di log.

@AshutoshPatole Apa versi flutter yang Anda kompilasi?

@vipinnegi90 flutter1.17.2
panah 2.8.3

@AshutoshPatole Saya percaya itu salah ketik untuk v1.17.1. Tingkatkan ke v1.17.2 dan coba.

@sarbagyastha

Log yang diperbarui:
Kesalahan muncul setelah menekan tombol layar penuh

V/AudioManager(21942): playSoundEffect   effectType: 0
V/AudioManager(21942): playSoundEffect   effectType: 0
E/BufferQueueProducer(21942): [] Can not get hwsched service
D/HwCust  (21942): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="9">@ebf21c8</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="10">@ebf21c8</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
I/PressGestureDetector(21942): HiTouch restricted: AboardArea.
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
I/zygote64(21942): Do full code cache collection, code=495KB, data=379KB
I/zygote64(21942): After code cache collection, code=473KB, data=297KB
W/InputMethodManager(21942): startInputReason = 3
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
D/        (21942): PlayerBase::PlayerBase()
D/        (21942): TrackPlayerBase::TrackPlayerBase()
I/libOpenSLES(21942): Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
D/AudioTrack(21942): OFFLOAD 0,mNotificationFrames 0,mStreamType =3,mOriginalSampleRate 48000,mAfSampleRate 44100,mTransfer 1
D/AudioTrack(21942): Client defaulted notificationFrames to 8811 for frameCount 26433
E/chromium(21942): [ERROR:web_contents_delegate.cc(218)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
E/chromium(21942): [ERROR:web_contents_delegate.cc(218)] WebContentsDelegate::CheckMediaAccessPermission: Not supported.
I/CameraManagerGlobal(21942): do not need hide aux camera, device number: 2
W/cr_media(21942): Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO. No audio device will be available for recording
I/CameraManagerGlobal(21942): do not need hide aux camera, device number: 2
I/chatty  (21942): uid=10314(u0_a314) ThreadPoolSingl identical 7 lines
I/CameraManagerGlobal(21942): do not need hide aux camera, device number: 2
I/CameraManagerGlobal(21942): do not need hide aux camera, device number: 2
I/CameraManagerGlobal(21942): do not need hide aux camera, device number: 2
V/AudioManager(21942): playSoundEffect   effectType: 0
I/PressGestureDetector(21942): ORIENTATION_LANDSCAPE
W/libEGL  (21942): EGLNativeWindowType 0x7a3b7f2010 disconnect failed
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (21942): EGLNativeWindowType 0x7a3b7f2010 disconnect failed
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/libEGL  (21942): EGLNativeWindowType 0x7a3b7f3010 disconnect failed
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
W/PlatformViewsController(21942): Creating a virtual display of size: [2160, 1080] may result in problems(https://github.com/flutter/flutter/issues/2897).It is larger than the device screen size: [1080, 2040].
D/HwCust  (21942): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="11">@97af80e</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="12">@97af80e</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
I/PressGestureDetector(21942): HiTouch restricted: AboardArea.
D/AudioTrack(21942): stop() called with 810524 frames delivered
D/        (21942): PlayerBase::stop() from IPlayer
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- LayoutBuilder(renderObject: _RenderLayoutBuilder#f8249)
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
W/libEGL  (21942): EGLNativeWindowType 0x7a3b7f3010 disconnect failed
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- MediaQuery(MediaQueryData(size: Size(360.0, 720.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
D/HwCust  (21942): Create obj success use class android.app.HwCustHwWallpaperManagerImpl
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="13">@e465ad4</strong>, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(21942): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3<strong i="14">@e465ad4</strong>, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
I/PressGestureDetector(21942): HiTouch restricted: AboardArea.
D/AudioTrack(21942): stop() called with 26433 frames delivered
D/        (21942): PlayerBase::stop() from IPlayer
D/mali_winsys(21942): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(21942):   HWUI Binary is  enabled
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE
V/AudioManager(21942): getProperty  key: android.media.property.OUTPUT_SAMPLE_RATE

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- MediaQuery(MediaQueryData(size: Size(360.0, 680.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
Multiple widgets used the same GlobalKey.
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- MediaQuery(MediaQueryData(size: Size(360.0, 680.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
Multiple widgets used the same GlobalKey.
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- MediaQuery(MediaQueryData(size: Size(360.0, 680.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown while finalizing the widget tree:
Multiple widgets used the same GlobalKey.

The key [GlobalKey#19eaf] was used by multiple widgets. The parents of those widgets were:
- MediaQuery(MediaQueryData(size: Size(720.0, 360.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
- MediaQuery(MediaQueryData(size: Size(360.0, 680.0), devicePixelRatio: 3.0, textScaleFactor: 1.0, platformBrightness: Brightness.light, padding: EdgeInsets.zero, viewPadding: EdgeInsets.zero, viewInsets: EdgeInsets.zero, physicalDepth: 1.7976931348623157e+308, alwaysUse24HourFormat: false, accessibleNavigation: false, highContrast: false, disableAnimations: false, invertColors: false, boldText: false))
A GlobalKey can only be specified on one widget at a time in the widget tree.
When the exception was thrown, this was the stack: 
#0      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:246:13)
#1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#2      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure>.<anonymous closure> (package:flutter/src/widgets/framework.dart:193:19)
#3      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
#4      GlobalKey._debugVerifyGlobalKeyReservation.<anonymous closure> (package:flutter/src/widgets/framework.dart:189:26)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
D/AudioTrack(21942): stop() called with 511038 frames delivered
D/        (21942): PlayerBase::stop() from IPlayer

@ vipinnegi90 bahkan setelah memutakhirkan ke 1.17.2 dan dart 2.8.3 masalah tetap ada.

Kunci Global ada di file terpisah
Kode:

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

class VideoScreen extends StatefulWidget {
  <strong i="9">@override</strong>
  _VideoScreenState createState() => _VideoScreenState();
}

class _VideoScreenState extends State<VideoScreen> {
  YoutubePlayerController _controller;

  <strong i="10">@override</strong>
  void initState() {
    _controller = YoutubePlayerController(
      initialVideoId: 'iLnmTe5Q2Qw',
      flags: YoutubePlayerFlags(
        autoPlay: true,
        mute: true,
      ),
    );
    super.initState();
  }

  <strong i="11">@override</strong>
  Widget build(BuildContext context) {
    return YoutubePlayerBuilder(
      player: YoutubePlayer(
        controller: _controller,
        showVideoProgressIndicator: true,
        onReady: () {
          _controller.addListener(() {});
        },
      ),
      builder: (context, player) {
        return Scaffold(
          body: SafeArea(
            child: player,
          ),
        );
      },
    );
  }
}

@AshutoshPatole apakah masalah ini diperbaiki untuk Anda?

Mengapa masalah ini ditutup? Saya masih memiliki masalah ini https://github.com/sarbagyastha/youtube_player_flutter/issues/241#issuecomment -637450169 tampaknya ada noSuchMethod pada objek saat _YoutubePlayerBuilderState.didChangeMetrics dipanggil.

@ vipinnegi90 ya masalah sudah diperbaiki.

@rafaelmaeuer bagi saya menggunakan tumpukan dengan youtube_player menyebabkan masalah ini.

@AshutoshPatole apakah mereka memperbaiki masalah tumpukan? atau apakah itu hanya batasan sekarang dalam menggunakan plugin ini?

Masalah ini tidak boleh ditutup bahkan sampel dengan YoutubePlayerBuilder tidak akan menjadi layar penuh. Itu hanya membuat pemain menjadi hitam dan tetap berukuran sama

bagi saya masalahnya tetap ada, meskipun saya tidak menggunakan pemutar dalam tumpukan

@emmett-deen Itu adalah masalah yang tepat dengan saya juga. Tetapi kode sampel berfungsi dengan baik ketika diimplementasikan di proyek baru (hanya kode sampel). Jadi saya mengubah titik masuk aplikasi di main.dart ke layar pemutar dan itu berfungsi dengan baik. Kemudian saya fokus pada aktivitas yang menavigasi ke layar pemain dan mendapatkan masalah di widget tumpukan. Widget tumpukan tidak ada hubungannya dengan layar pemutar tetapi saya tidak tahu mengapa itu mencegah pemutar untuk mengubah ukuran penuh.

edit: saya lupa memberi tahu Anda bahwa itu berfungsi seperti yang diharapkan sekarang

@AshutoshPatole , saya juga menghadapi masalah yang sama. Tidak yakin bagaimana cara memperbaikinya. Saya telah mencoba menambahkan kode contoh berkali-kali.

Saya membuka kembali masalah ini. Karena banyak orang menghadapi masalah yang sama

Saya pikir masalahnya adalah tentang rasio aspek perangkat. Ini hanya bertahan ketika rasio aspek lebih panjang dari 16:9.

Sebagai contoh, saya tidak memiliki masalah saat menggunakan Redmi 3S (rasio 16:9). Tapi begitu saya menggunakan Galaxy A50 (rasio 19,5: 9), itu hanya menutup mode layar penuh.

Dan saya tidak memiliki masalah saat menggunakan Galaxy S8. Tapi begitu saya menggunakan PIXEL 3, itu hanya menutup mode layar penuh. :/

Sama untuk ku; Pemutar potret berkedip hitam selama sepersekian detik dan kemudian tetap pada ukuran yang sama, tidak ada yang terjadi.

Masalah yang sama disini. Ini hanya berfungsi ketika pemutar berada di halaman tanpa widget lain.

Saya juga menghadapi masalah yang sama.

onEnterFullScreen: () { SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]); _controller.play(); },
saat menggunakan kode di atas di YoutubePlayerBuilder, Ini berfungsi dengan baik untuk saya.

Masalah yang sama, pemain mencoba menjadi layar penuh, tetapi pemutar lebih besar dari layar saya yang sebenarnya:

PlatformViewsController(16046): Membuat tampilan virtual dengan ukuran: [2201, 1080] dapat mengakibatkan masalah(https://github.com/flutter/flutter/issues/2897). Ini lebih besar dari ukuran layar perangkat: [2075 , 1080].

EDIT:
Menghapus SafeArea saya memperbaiki masalah.
EDIT 2:
Menghapus SafeArea TIDAK memperbaiki masalah :(

Setelah pembaruan ke v7, layar penuh tidak berfungsi lagi. Saya membungkus komponen di YoutubePlayerBuilder tetapi tidak membantu. Ini dari log kesalahan:

Tried calling: value
#0      Object.noSuchMethod  (dart:core-patch/object_patch.dart:53:5)
#1      _YoutubePlayerBuilderState.didChangeMetrics 
package:youtube_player_flutter/…/widgets/youtube_player_builder.dart:58
#2      WidgetsBinding.handleMetricsChanged 
package:flutter/…/widgets/binding.dart:538
#3      _rootRun  (dart:async/zone.dart:1184:13)
#4      _CustomZone.run  (dart:async/zone.dart:1077:19)
#5      _CustomZone.runGuarded  (dart:async/zone.dart:979:7)
#6      _invoke  (dart:ui/hooks.dart:261:10)
#7      _updateWindowMetrics  (dart:ui/hooks.dart:64:3)

Mengapa masalah ini ditutup? Saya masih memiliki masalah #241 (komentar) tampaknya ada noSuchMethod pada objek ketika _YoutubePlayerBuilderState.didChangeMetrics dipanggil.

AKU untuk

Hari ini saya mengganti lib ini dengan youtube_plyr_iframe . Ini adalah garpu dari youtube_player_iframe yang dipertahankan, mutakhir dan memiliki beberapa masalah besar yang diperbaiki. Penggantiannya cukup mudah dan hanya berfungsi, termasuk layar penuh dari tumpukan widget.

youtube_player_flutter 8 0 0

youtube_player_flutter versi 8.0.0 bug yang sama

@sarbagyastha Saya kira Anda harus melihat masalah ini. Saya melihat banyak masalah yang agak mirip dengan yang satu ini.
Berharap ini akan segera diperbaiki.

youtube_player_flutter 8 0 0

youtube_player_flutter versi 8.0.0 bug yang sama

Saya menghadapi masalah yang sama persis. Masalahnya terjadi ketika saya menggunakan bilah navigasi OS. Jika saya mengatur navigasi OS ke gerakan, itu berfungsi dengan baik.

Perubahan apapun?.
Saya menghadapi masalah yang sama.

Tidak menggunakan SystemChrome.setPreferredOrientations(DeviceOrientation.values); akan memperbaiki lompatan layar penuh ke potret namun video akan lebih besar dari ukuran layar (misalnya video saya memiliki subtitle dan setengah dari subtitle saya dihapus)

Screenshot_1637127104

Tidak menggunakan SystemChrome.setPreferredOrientations(DeviceOrientation.values); akan memperbaiki lompatan layar penuh ke potret namun video akan lebih besar dari ukuran layar (misalnya video saya memiliki subtitle dan setengah dari subtitle saya dihapus)

Screenshot_1637127104

Masalah yang sama, video selalu memenuhi layar, apa pun rasio aspek yang Anda berikan. Membungkusnya dalam SizedBox juga tidak membantu.

Apakah halaman ini membantu?
0 / 5 - 0 peringkat