• This repository has been archived on 11/Feb/2022
  • Stars
    star
    181
  • Rank 204,334 (Top 5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simplified Player wrapper for MediaPlayer and ExoPlayer

This project is no longer under maintenance - 13/7/2020

Upgrades to latests version of ExoPlayer requires a significative amount of changes. The project is no longer maintained from our end.


noplayer

CI status Download from Bintray Tests Coverage Apache 2.0 Licence

A simplified Android Player wrapper for MediaPlayer and ExoPlayer.

Description

Some of the benefits are:

  • Unified playback interface and event listeners for ExoPlayer and MediaPlayer
  • MediaPlayer buffering
  • ExoPlayer local, streaming and provisioning WideVine Modular DRM
  • Maintains video Aspect Ratio by default
  • Player selection based on ContentType and DRM

Experimental Features, use with caution:

  • Support for TextureView

Adding to your project

To start using this library, add these lines to the build.gradle of your project:

repositories {
    jcenter()
}

dependencies {
    implementation 'com.novoda:no-player:<latest-version>'
}

From no-player 4.5.0 this is also needed in the android section of your build.gradle

compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
}

Simple usage

  1. Create a Player:

    Player player = new PlayerBuilder()
      .withPriority(PlayerType.EXO_PLAYER)
      .withWidevineModularStreamingDrm(drmHandler)
      .build(this);
  2. Create the PlayerView:

    <com.novoda.noplayer.NoPlayerView
      android:id="@+id/player_view"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center" />
  3. Attach to a PlayerView:

    PlayerView playerView = findViewById(R.id.player_view);
    player.attach(playerView);
  4. Play some content:

    player.getListeners().addPreparedListener(playerState -> player.play());
    
    Uri uri = Uri.parse(mpdUrl);
    player.loadVideo(uri, ContentType.DASH);

Snapshots

CI status Download from Bintray

Snapshot builds from develop are automatically deployed to a repository that is not synced with JCenter. To consume a snapshot build add an additional maven repo as follows:

repositories {
    maven {
        url 'https://dl.bintray.com/novoda-oss/snapshots/'
    }
}

You can find the latest snapshot version following this link.

Contributing

We always welcome people to contribute new features or bug fixes, here is how.

If you have a problem, check the Issues Page first to see if we are already working on it.

Looking for community help? Browse the already asked Stack Overflow Questions or use the tag support-no-player when posting a new question.

More Repositories

1

android-demos

Examples of Android applications
Java
1,984
star
2

bintray-release

A helper for releasing from gradle up to bintray
Groovy
1,857
star
3

bonfire-firebase-sample

An app to discuss your favourite emojis. This is a sample app built with Firebase.
Java
549
star
4

merlin

Observes network connection status & gives callbacks
Java
544
star
5

spikes

Where ideas & concepts are born & incubated
Java
543
star
6

download-manager

A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Java
487
star
7

gradle-static-analysis-plugin

Easy setup of static analysis tools for Android and Java projects.
Groovy
408
star
8

rxpresso

Easy Espresso UI testing for Android applications using RxJava.
Java
363
star
9

gradle-android-command-plugin

Handy commands for testing Android on CI
Groovy
358
star
10

sqlite-provider

Extended SQLite functionality for Android
Java
303
star
11

simple-chrome-custom-tabs

Easy integration of Chrome Custom Tabs into your project. Just connect it to your activity, and navigate to the external website styling your tab as you wish.
Java
129
star
12

notils

Never again need a .utils. package yur scurvy sea dogs!
Java
122
star
13

gradle-build-properties-plugin

Keep your secrets secret. External build properties support for your Gradle scripts.
Groovy
112
star
14

ios-demos

Examples of ios applications http://www.novoda.com/blog
Swift
95
star
15

accessibilitools

UI tools to help make your Android app accessible.
Java
81
star
16

dojos

This is where the Novoda team do all their hacking
Java
76
star
17

simple-easy-xml-parser

Simple XML Parsing into Domain Objects
Java
69
star
18

sqlite-analyzer

Code generation for Java/Android database access.
Java
64
star
19

spritz

Spritz is an Android library to seamlessly trigger a Lottie animation
Java
62
star
20

espresso-support

Includes custom rules for testing Views in isolation and running tests with Google TalkBack enabled.
Java
60
star
21

novoda

Common things for all Novoda's open source projects
Java
37
star
22

view-pager-adapter

A simple implementation of PagerAdapter that supports Views.
Java
29
star
23

aosp.changelog.to

Generates a change log between different aosp tags. Based on the wonderful work of @alsutton
HTML
15
star
24

droidcon-booth

Novoda will be showing you CI in action at our Droidcon London booth!
Java
14
star
25

landing-strip

Your simple sliding viewpager tab strip: a landing strip without the fluff!
Java
13
star
26

novoda.github.io

GitHub open source landing page
SCSS
11
star
27

dashboards

The dashboards we have running in our offices!
JavaScript
10
star
28

drop-cap

Custom DropCap view without Spans
Java
10
star
29

public-mvn-repo

Novoda Public Maven Central Repository
7
star
30

github-reports

Github reports for a given organisation
Java
5
star
31

ncu

Novoda Craft University
3
star
32

peepz

Java
3
star
33

eslint-config-novoda

JavaScript
3
star
34

storage-path-finder

Library to perform the heavy lifting when attempting to find internal / external paths for primary and secondary storage.
Java
3
star
35

multiplatform-playground

A repository to play and learn about different multi-platform technologies
TypeScript
2
star
36

dashboard-plugins

A collection of plugins for the dashboard
JavaScript
2
star
37

react-native-workshop

JavaScript
1
star
38

dreams

A REST API using Stable Diffusion for Text to Image inference
Shell
1
star
39

github-slack-action

Simple Github Action to post a message in Slack
Shell
1
star