Observing black screen while switching ExoPlayer controls inside MotionLayout
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
As per my requirement is I have to dock/move the Exo Player view from the top and the bottom right (not ribbon, but what youtube used to do a few years back). And once the player is docked we would have limited UI components only a play/pause button.
For achieving the scenario I am using MotionLayout providing the required dragDown animation and in the process, we translate and scale the player to achieve the required UI, and for achieving the docked player control(i.e. play/pause button) we tend to switch the player view using **PlayerView.switchTargetView** to get the expected result but while switching the custom controls the screen becomes black for few seconds. You can have a look at the video for a better understanding.
I tried **view.setShutterBackgroundColor(Color.TRANSPARENT)** but the issue still seems to persist
The content is un-protected content. Url of the content is - [http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4](http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4)
I have attached the main activity **(MainActivity)** along with its XML (**activity_main**) and layoutDescription (**scene_dock**) file of my demo application. I request you to have a look and into this and help me out with the reason for the black screen. I am changing the player controls inside **onTransitionCompleted** using the **PlayerView.switchTargetView(p,v1,v2)**
Can you guys help me with some suggestions?
- ExoPlayer version number: **2.11.8**
- Android version: **8.1.0, MIUI 12.0.2 (Android OS 10)**
- Android device: **Oppo A5s, POCO F1**
[scene_dock.txt](https://github.com/google/ExoPlayer/files/5830302/scene_dock.txt)
[MainActivity.txt](https://github.com/google/ExoPlayer/files/5830303/MainActivity.txt)
[activity_main.txt](https://github.com/google/ExoPlayer/files/5830304/activity_main.txt)
Contributor guide
Assessment
This issue has not been assessed yet.