Open sajjadshahbazi opened 2 years ago
This looks like a general Android UI challenge on various API levels for me that you need to solve in your app.
Can you narrow down the bug report in what you think is broken on the StyledPlayerView
?
I don't know what more information you need?
I have two StyledPlayerView, one of them for the main video (id: playerView) and another for the play advertisement(id: playerAdView). before starting the main video I played an advertisement after that I init exoplayer of the main video and start playing the main video, After 10 seconds, I play the ad again, but in this situation playerAdView (for advertisement ) is displayed behind of playerView (the main video). I can't play a video over another video unless release an older player . I do know what things make that older StyledPlayerView play above another StyledPlayerView. in problem just happen in android 7.
I came to resolve this problem with change the visibility of StyledPlayerViews, but StyledPlayerView after every time gone and visible ,it automatically sets the bottom border for defualttimebar, which messes up the design.
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/motionLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:keepScreenOn="true" android:layoutDirection="rtl" app:layoutDescription="@xml/activity_tv_media_player_scene" tools:context=".mediaPlayer.player.TvVideoPlayerActivity"> ... <com.google.android.exoplayer2.ui.StyledPlayerView android:id="@+id/playerView" android:layout_width="0dp" android:layout_height="0dp" android:background="@color/black" app:animation_enabled="false" app:controller_layout_id="@layout/exo_playback_control_view" app:hide_during_ads="true" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:resize_mode="fit" app:show_buffering="never" /> ... <com.google.android.exoplayer2.ui.StyledPlayerView android:id="@+id/playerAdView" android:layout_width="0dp" android:layout_height="0dp" android:background="@color/black" android:focusable="true" app:animation_enabled="false" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:resize_mode="fit" app:show_buffering="never" app:use_controller="false" /> ... </androidx.constraintlayout.widget.ConstraintLayout>
I need to control elevations of StyledPlayerViews or prevent changing bottom margin of defaulttimebar.
I even put StyledPlayerView of advertisement at the new fragment but still displaying behind of playerView (the main video) !!
ExoPlayer Version
2.17.1
Devices that reproduce the issue
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
I have two StyledPlayerView, which one of them for the main video and another for the playback advertisement. while playing the main movie we want to play an advertisement over the main film(when playing the advertisement we paused the main video), but the StyledPlayerView of the advertisement playing behind the StyledPlayerView of the main video in the android 7 version, while on another android device is correct. To solve this problem I became changed the visibility of StyledPlayerViews, which came a new problem on all android versions. the new problem is: change the bottom margin after any time gone and visible StyledPlayerView of the main video, while I don't have logic for change margins.
please guide me
Expected result
I expect to StyledPlayerView of advertisement over StyledPlayerView of the mani video in all android versions.
Actual result
exo_playback_control_view :
Media
vmap link : https://castqqq.free.beeceptor.com/test01
the main video has a token that has expired time.
Bug Report
adb bugreport
to dev.exoplayer@gmail.com after filing this issue.