Skip to content

Commit

Permalink
fix: simplify surface management
Browse files Browse the repository at this point in the history
  • Loading branch information
freeboub committed Jun 9, 2024
1 parent f7cc6cd commit e0a1815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public final class ExoPlayerView extends FrameLayout implements AdViewProvider {

private boolean hideShutterView = false;

public ExoPlayerView(Context context, @ViewType.ViewType int viewType) {
public ExoPlayerView(Context context) {
super(context, null, 0);

this.context = context;
Expand All @@ -75,7 +75,7 @@ public ExoPlayerView(Context context, @ViewType.ViewType int viewType) {
subtitleLayout.setUserDefaultStyle();
subtitleLayout.setUserDefaultTextSize();

updateSurfaceView(viewType);
updateSurfaceView(ViewType.VIEW_TYPE_SURFACE);

adOverlayFrameLayout = new FrameLayout(context);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ private void createViews() {
LayoutParams layoutParams = new LayoutParams(
LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT);
exoPlayerView = new ExoPlayerView(getContext(), source.getViewType());
exoPlayerView = new ExoPlayerView(getContext());
exoPlayerView.setLayoutParams(layoutParams);
addView(exoPlayerView, 0, layoutParams);

Expand Down

0 comments on commit e0a1815

Please sign in to comment.