kunal.c
kunal.c

Reputation: 2837

Only Audio player for Exoplayer 2 (No video)

Currently i have created SimpleExoplayer using below https://github.com/googlecodelabs/exoplayer-intro/tree/master/exoplayer-codelab-01

UI for SimpleExoplayer has video view and controls.

Removing and/or customizing video view did not worked properly. Any use case of SimpleExoplayer only with Audio controls and no Video view.

Upvotes: 4

Views: 4395

Answers (1)

John O'Reilly
John O'Reilly

Reputation: 10330

You can do this using following...set app:controller_layout_id to your own version of that layout that does not include video layout (and generally gives you more control of layout/style of audio controls as well if needed)

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
    android:id="@+id/audio_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:show_timeout="0"
    app:hide_on_touch="false"
    app:use_artwork="false"
    app:controller_layout_id="@layout/exo_playback_control_view" />

Upvotes: 5

Related Questions