Kohii

Android Video Playback made easy.

License

License

GroupId

GroupId

im.ene.kohii
ArtifactId

ArtifactId

kohii-androidx
Last Version

Last Version

1.2.0.2011008
Release Date

Release Date

Type

Type

aar
Description

Description

Kohii
Android Video Playback made easy.
Project URL

Project URL

https://github.com/eneim/kohii
Source Code Management

Source Code Management

https://github.com/eneim/kohii/

Download kohii-androidx

How to add to project

<!-- https://jarcasting.com/artifacts/im.ene.kohii/kohii-androidx/ -->
<dependency>
    <groupId>im.ene.kohii</groupId>
    <artifactId>kohii-androidx</artifactId>
    <version>1.2.0.2011008</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/im.ene.kohii/kohii-androidx/
implementation 'im.ene.kohii:kohii-androidx:1.2.0.2011008'
// https://jarcasting.com/artifacts/im.ene.kohii/kohii-androidx/
implementation ("im.ene.kohii:kohii-androidx:1.2.0.2011008")
'im.ene.kohii:kohii-androidx:aar:1.2.0.2011008'
<dependency org="im.ene.kohii" name="kohii-androidx" rev="1.2.0.2011008">
  <artifact name="kohii-androidx" type="aar" />
</dependency>
@Grapes(
@Grab(group='im.ene.kohii', module='kohii-androidx', version='1.2.0.2011008')
)
libraryDependencies += "im.ene.kohii" % "kohii-androidx" % "1.2.0.2011008"
[im.ene.kohii/kohii-androidx "1.2.0.2011008"]

Dependencies

runtime (10)

Group / Artifact Type Version
im.ene.kohii : kohii-core jar 1.2.0.2011008
androidx.media2 » media2-common jar 1.0.3
androidx.media2 » media2-player jar 1.0.3
androidx.media2 » media2-session jar 1.0.3
androidx.media2 » media2-widget jar 1.0.3
com.google.android.exoplayer » exoplayer-core jar 2.11.8
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.10
androidx.appcompat » appcompat jar 1.1.0
androidx.core » core-ktx jar 1.3.0
androidx.collection » collection-ktx jar 1.1.0

Project Modules

There are no modules declared in this project.

Kohii

kohii (コーヒー、[ko̞ːçiː])

Kohii

Video playback for Android made easy.

Bintray Maven Central

Kohii is a powerful, easy to use and extensible Video playback library. Kohii provides powerful features out of the box, including

  1. Easy to start: just one line to start a Video playback.
  2. Automatic playback experience on RecyclerView, NestedScrollView, ViewPager2, etc.
  3. Configuration change handling works out of the box, including the transition from local playback to fullscreen playback and vice versa.
  4. Feature-rich sample app that covers either simple or advance use cases.
  5. Extension-based structure, including default implementations that support ExoPlayer, AndroidX Media2, YouTube Player SDK.

Demo

Automatic playback Playback continuity (Seamless fullscreen)

Setup

Add to your module's build.gradle dependencies

// Update top level build.gradle
allprojects {
  repositories {
    jcenter()
    // mavenCentral() should also work.
  }
}
// Add these to app level build.gradle (or to module that will use Kohii)
implementation "im.ene.kohii:kohii-core:1.0.0.2010004" // core library
implementation "im.ene.kohii:kohii-exoplayer:1.0.0.2010004" // default support for ExoPlayer
implementation "com.google.android.exoplayer:exoplayer:2.10.4" // required ExoPlayer implementation.

Kohii uses Kotlin language with some Java 8 features so you will need to include the following options to your module's build.gradle:

android {
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }

  kotlinOptions {
    jvmTarget = "1.8"
    freeCompilerArgs += [
        '-Xjvm-default=enable'
    ]
  }
}

Start a playback

// Kotlin
// 1. Initialization in Fragment or Activity
val kohii = Kohii[this@Fragment]
kohii.register(this /* Fragment or Activity */).addBucket(this.recyclerView)

// 2. In ViewHolder or Adapter: bind the video to the PlayerView inside a child of the RecyclerView.
kohii.setUp(videoUrl).bind(playerView)
// Java
// 1. Initialization in Fragment or Activity
Kohii kohii = Kohii.get(this);
kohii.register(this).addBucket(this.recyclerView);

// 2. In ViewHolder or Adapter: bind the video to the PlayerView inside a child of the RecyclerView.
kohii.setUp(videoUrl).bind(playerView);

Requirements

Kohii works on Android 4.4+ (API level 19+) and on Java 8+. It is recommended to use Kohii using Kotlin.

The core library doesn't come with any actual playback logic. Actual implementation comes with extension libraries. The extensions require corresponding 3rd libraries: kohii-exoplayer will requires exoplayer, kohii-androidx will requires androidx.media2.

Versions

Version
1.2.0.2011008
1.2.0.2011008-RC2
1.2.0.2011008-RC1
1.1.1.2011003
1.1.0.2011003
1.1.0.2011003-RC2
1.1.0.2011003-RC1
1.0.0.2010004
1.0.0.2010004-beta.5
1.0.0.2010004-beta.4
1.0.0.2010004-beta.3
1.0.0.2010004-B2
1.0.0.2010004-B1
1.0.0.2010004-B0