Giter Site home page Giter Site logo

exomedia's Introduction

ExoMedia

ExoMedia is a media playback library with similar APIs to the Android MediaPlayer and VideoView that uses the ExoPlayer as a backing when possible, otherwise the default Android MediaPlayer and VideoView are used.

The ExoPlayer is only supported on devices that pass the compatibility Test Suite and that are JellyBean (API 16) or greater. The ExoPlayer provides additional support for streaming (HLS, DASH, etc.) and full HD (1080p +)

Website And Documentation

The ExoMedia website can be found here
The ExoMedia documentation website can be found on the website linked above or here

Use

The latest AAR (Android Archive) files can be downloaded from JCenter
Or included in your gradle dependencies

repositories {
    jcenter()
}

dependencies {
    compile 'com.devbrackets.android:exomedia:4.0.2'
}

Example

The ExoMedia VideoView can be added in your layout files like any other Android view.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

	<com.devbrackets.android.exomedia.ui.widget.VideoView
		android:id="@+id/video_view"
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		app:useDefaultControls="true"/>
		
</RelativeLayout>

While in your Activity or Fragment you treat it like a standard Android VideoView

private VideoView videoView;

private void setupVideoView() {
	// Make sure to use the correct VideoView import
	videoView = (VideoView)findViewById(R.id.video_view);
	videoView.setOnPreparedListener(this);

    //For now we just picked an arbitrary item to play
    videoView.setVideoURI(Uri.parse("https://archive.org/download/Popeye_forPresident/Popeye_forPresident_512kb.mp4"));
}

@Override
public void onPrepared() {
	//Starts the video playback as soon as it is ready
	videoView.start();
}

License

Copyright 2015-2017 Brian Wernick

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Attribution

exomedia's People

Contributors

brianwernick avatar camilasousa avatar daimajia avatar drewcarlson avatar eygraber avatar gounlaf avatar hansenji avatar httpdispatch avatar jarrodholliday avatar jaynewstrom avatar jeffdcamp avatar martinothamar avatar n-i-x avatar ordonteam avatar sangcomz avatar se-bastiaan avatar stanmots avatar volser avatar zacsweers avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.