Skip to content

Conversation

@bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Oct 9, 2024

It seems that VideoView continues to show the last frame of the previous video until the new video starts playing. This causes the VideoView to momentarily show the last frame while the new video was being prepared. It looks like neither videoView.setUri(null) or videoView.stopPlayback would reset the state.

The simplest solution I could find would be to create a new VideoView whenever an Ad stops playing.

Related links:

google/ExoPlayer#1942
https://stackoverflow.com/questions/25660994/clear-video-frame-from-surfaceview-on-video-complete

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@bparrishMines bparrishMines changed the title fix create [interactive_media_ads] Oct 9, 2024
@bparrishMines bparrishMines changed the title [interactive_media_ads] [interactive_media_ads] Fixes bug where Android would show the last frame of the previous Ad before playing the current one Oct 9, 2024
@bparrishMines bparrishMines marked this pull request as ready for review October 9, 2024 18:48
@bparrishMines
Copy link
Contributor Author

cc @harold1208

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 10, 2024
@auto-submit auto-submit bot merged commit 791c6e3 into flutter:main Oct 10, 2024
@bparrishMines bparrishMines deleted the ima_android_videoview_fix branch October 10, 2024 18:45
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 11, 2024
…e last frame of the previous Ad before playing the current one (flutter/packages#7835)
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 11, 2024
flutter/packages@f1a3da2...67401e1

2024-10-10 [email protected] Roll Flutter from 2d45fb3 to 6790525 (7 revisions) (flutter/packages#7843)
2024-10-10 [email protected] [webview_flutter] Updates minimum supported `webview_flutter_android` from 3.16.0 to 4.0.0 (flutter/packages#7844)
2024-10-10 49699333+dependabot[bot]@users.noreply.github.com [webview]: Bump androidx.webkit:webkit from 1.12.0 to 1.12.1 in /packages/webview_flutter/webview_flutter_android/android (flutter/packages#7801)
2024-10-10 [email protected] [interactive_media_ads] Fixes bug where Android would show the last frame of the previous Ad before playing the current one (flutter/packages#7835)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: interactive_media_ads Plugin for IMA SDK platform-android platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants