Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

batyrf/CompactPlayerView

Open more actions menu

Repository files navigation

CompactPlayerView

Helper for removing exoplayer set up boilerplates and setting attributes on xml

<tm.mr.compactplayerview.PlayerView
    android:id="@+id/player"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    app:src="http://gormless.dx.am/videos/mama.mp4, R.raw.islands, /storage/emulated/0/download/test.mp4"
    app:volume="0.5"
    app:autoplay="true"
    app:repeat_mode="all"
    app:layout_constraintDimensionRatio="16:9"
    app:layout_constraintTop_toTopOf="parent" />

properties:

  • play from url, file, raw resource, playlist:

    • app:src="http://gormless.dx.am/videos/mama.mp4"
    • app:src="/storage/emulated/0/download/test.mp4"
    • app:src="R.raw.islands"
    • app:src="http://gormless.dx.am/videos/mama.mp4, R.raw.islands, /storage/emulated/0/download/test.mp4"
  • set volume: app:volume="0.5"

  • set autoplay: app:autoplay="true"

  • set repead mode: app:repeat_mode="all|one|none"

implementation:

  1. project build.gradle:

    allprojects {
        repositories {
            maven { url 'https://jitpack.io' }
            ...
        }
    }
  2. app build.gradle

    android {
        ...
        compileOptions {
            sourceCompatibility 1.8
            targetCompatibility 1.8
        }
        ...
    }
    ...
    dependencies {
        implementation 'com.github.batyrf:CompactPlayerView:1.0.0'
        implementation 'com.google.android.exoplayer:exoplayer:2.9.6'
        implementation 'com.google.android.exoplayer:exoplayer-core:2.9.6'
        implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.6'
        implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.6'
    }

About

Helper for removing exoplayer set up boilerplates and setting attributes on xml

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.