androidx / androidx/media

Black artifacts during SurfaceView resize animation with secure decoder in tunneling mode

Open
#3,070 0 comments 0 reactions 1 assignee View on GitHub

@oceanjules is already working on this.

Since Feb 16, 2026.

needs triage question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

1.3.1

Device / Android Version

An Android TV device / API Level 34


Issue Summary

When using SurfaceView with a secure decoder in tunneling mode, animating the SurfaceView size from small to fullscreen (unsqueeze) produces visible black artifacts along the edges during the transition.

Image
Image

The reverse direction (squeeze: fullscreen → small) does NOT exhibit this issue, because the video buffer is always larger than or equal to
the shrinking hole.

YouTube app on the same device:

I also observed the same black artifacts in the YouTube app on the same device when performing the same unsqueeze animation (small →
fullscreen). This suggests the issue is not specific to our implementation but rather a fundamental platform-level limitation.

Image
Image


Related Issues

I searched both androidx/media and google/ExoPlayer repositories extensively. I found no existing issue that addresses this exact scenario (SurfaceView resize animation + secure decoder + tunneling mode).


Question

  1. Is there any known workaround or recommended approach within media3 to eliminate or reduce black artifacts when animating SurfaceView size with a secure decoder in tunneling mode?

  2. Is there any mechanism to synchronize the View hole expansion with the Surface buffer resize so that the hole never exceeds the buffer area during animation?

  3. Would it be feasible for media3 to provide an API or utility that handles smooth SurfaceView resize animations, particularly for secure playback scenarios where TextureView is not an option?

  4. Is this considered a known platform limitation with no current solution?

Any guidance or insight would be greatly appreciated. Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.