question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue when switching two surfaceview in sony bravia TV

See original GitHub issue

In my sample app i have feature to swap one full screen player and small PIP player above full screen player , when clicking on swap button i need to swap content each other. Each player is sitting in different fragment. When switching i am changing the constraint with animation TransitionManager.beginDelayedTransition(layout) . i am changing the elevation of fragment container to bring small player above big player on each swap operation. This is working fine when i set surface as textureview but i found that when i set surface as surfaceview , the small player which is shown above getting transparent on surface part. By setting setZOrderMediaOverlay true to small player it is fixed in other devices like Nvdea and MIBox but sony tv failed to pass with that fix.

i have changed the video renderer from OMX.MTK.VIDEO.DECODER.AVC to OMX.google.h264.decoder then its works but i cannot rely on software codec

any idea whats going on here ?

here is the sample code :

ExoPlayerTest.zip

android version : 9 exo-player version - 2.12.1

swap-surface

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fgl27commented, Mar 16, 2021

I’m just a user of ExoPlayer trying to help as this is something that affect one of my projects, once the developers responsible for ExoPlayer have all the info and is determined that the manufacturer of the device need to take a look they will inform and reply back to you on what can be done.

Two sample of that here https://github.com/google/ExoPlayer/issues/8427 and https://github.com/google/ExoPlayer/issues/7998

1reaction
donchummarcommented, Mar 15, 2021
  • As a workaround for sony tv devices, is it acceptable for you to use Texture view?

we are moving all the contents to drm protected asset with multiview so we eventually have to move to surfaceview

  • Report to the device manufacturer. I think we can help with this if you provide us with two videos captured on the device using adb shell screenrecord, which clearly show the expected and observed behavior.

attached video of how it behaves

this video is recored with adb but for some reason this video not showing the issue as actually visible in tv
https://user-images.githubusercontent.com/6000288/111228043-ad13a080-8637-11eb-9849-7971e5f57022.mp4

so i have recorded video with my mobile to see actual behaviour. attaching the same here

https://user-images.githubusercontent.com/6000288/111231123-d1be4700-863c-11eb-8807-848469a2eb10.mp4

one more thing to mention when we switch players with big and small , small player is able to move to big player but big player first rendered is failing to display in small player on further switch it behaves same.

  • Setting setZOrderMediaOverlay to false for the big view is recommended.

if you see the code i have provided i am doing that but does not help

the above app also has the same issue attaching the video here , you can see that video is loading and once starts its going behind the big player

https://user-images.githubusercontent.com/6000288/111231640-ba338e00-863d-11eb-810d-f41a949842a0.mp4

Read more comments on GitHub >

github_iconTop Results From Across the Web

issue when Surfaceview Above Another Surfaceview swap in ...
The only secure solution is to Detach both SurfaceViews and then re-attach them in the right order (or just swap internal Render Threads ......
Read more >
The TV changes channels, video inputs or raises and lowers ...
If the TV changes channels, video inputs or raises and lowers the volume by itself, follow the steps below to troubleshoot the issue....
Read more >
No 4k in Kodi for Sony Bravia A80J
It's very confusing that TV uses different settings for different apps and different HDMI inputs. Also even same HDMI input (or same app)...
Read more >
Why does my new Bravia keep switching itself off? - Page 2
Same issue continues and then after I had the set now a total of nine months they sent me a Sony "certified" replacement...
Read more >
Surfaceview Rotation Issue On Android 6 - ADocLib
SurfaceView is a widget on the Android platform which provides a ... Anonymous issue when Surfaceview Above Another Surfaceview swap in sony bravia...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found