sarbagyastha / youtube_player_flutter

Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API. Supports both Android and iOS platforms.
BSD 3-Clause "New" or "Revised" License
682 stars 754 forks source link

[BUG] On a physical device the video freezes (this also happens by testing the example code) [youtube_player_iframe] #326

Open bl4kcrow opened 3 years ago

bl4kcrow commented 3 years ago

Describe the bug First at all, this package offers interesting functionalities, unfortunately I've notice that it doesn't works properly on a physical device [in this case Samsung S8], testing the example code using other videos you can see that even the sound continues playing, the video freezes, watch the video attached.

To Reproduce Use the example code provided by the package youtube_player_iframe, adding the permissions to stream videos from the internet and run it on a physical device, using the video IDs 'tAv5Rxpl_UY', 'PaHSXOojGgg', 'x9hZFyoqp7Q', 'Dgs2SYBPKMI'.

Expected behavior The video should not freeze

Screenshots GIF showing the behavior bug-youtube-player-iframe_2

Complete video showing the behavior Download ⬇ bug-youtube-player-iframe.zip

Technical Details:

Debug console messages: D/ (28975): PlayerBase::stop() from IPlayer D/AudioTrack(28975): stop() called with 2705290 frames delivered W/cr_MediaCodecBridge(28975): Releasing: OMX.Exynos.vp9.dec I/ACodec (28975): [OMX.Exynos.vp9.dec] Now Executing->Idle I/ACodec (28975): [OMX.Exynos.vp9.dec] Now Idle->Loaded I/ACodec (28975): [OMX.Exynos.vp9.dec] Now Loaded I/SmartFittingClass(28975): ShutDownSmartFitting!! I/SmartFittingClass(28975): SmartFittingManagerServiceProxy::Deinit I/SmartFittingClass(28975): Destroy SmartFitting!! I/SmartFittingClass(28975): Destroy ~SmartFittingManagerServiceProxy::EventHandler I/SmartFittingClass(28975): Destroy SmartFittingManagerServiceProxy!! I/SmartFittingClass(28975): Destroy SmartFittingListener I/ACodec (28975): [OMX.Exynos.vp9.dec] Now uninitialized I/ACodec (28975): [] Now kWhatShutdownCompleted event : 8553 D/SurfaceUtils(28975): disconnecting from surface 0x7175c37010, reason disconnectFromSurface I/MediaCodec(28975): Codec shutdown complete W/cr_MediaCodecBridge(28975): Codec released D/ViewRootImpl@df36b72MainActivity: Relayout returned: old=[0,0][1080,608] new=[0,0][1080,608] result=0x1 surface={valid=true 489140609024} changed=false W/AudioManager(28975): Use of stream types is deprecated for operations other than volume control W/AudioManager(28975): See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case D/AudioManager(28975): requestAudioFocus status : 1 D/ViewRootImpl@df36b72MainActivity: Relayout returned: old=[0,0][1080,608] new=[0,0][1080,608] result=0x1 surface={valid=true 489140609024} changed=false I/flutter (28975): NoSuchMethodError: The method 'toDouble' was called on null. I/flutter (28975): Receiver: null I/flutter (28975): Tried calling: toDouble() I/chatty (28975): uid=10381(com.example.youtube_player_iframe_example) 1.ui identical 1 line I/flutter (28975): NoSuchMethodError: The method 'toDouble' was called on null. I/flutter (28975): Receiver: null I/flutter (28975): Tried calling: toDouble() I/flutter (28975): NoSuchMethodError: The method 'toDouble' was called on null. I/flutter (28975): Receiver: null I/flutter (28975): Tried calling: toDouble()

Additional context

Thanks !

moribellamy commented 1 year ago

@bl4kcrow thanks for the bug report. anecdotally, do you have any advice or updates? i wonder if i am having the same issue -- but none of my monitoring tools or metrics are giving helpful clues.

@sarbagyastha have you noticed this? any advice or workarounds?

dittombek commented 7 months ago

any updates about it? i use real device samsung A50