GithubHelp home page GithubHelp logo

minthubk / exposure-video-player Goto Github PK

View Code? Open in Web Editor NEW

This project forked from waffle-iron/exposure-video-player

0.0 2.0 0.0 7.28 MB

Custom Android video player API library

License: GNU General Public License v3.0

Java 100.00%

exposure-video-player's Introduction

###Donate Here: Stories in Ready Bintray Android Arsenal Codewake Stories in Ready

####Note that this Repo is still in development. ####So if you find any bugs or things that dont work the way they should please report them, ####Thank you.

Exposure-Video-Player

####Custom Android video player API library. Simple and integrate with your apps quickly and efficiently.

#Whats New: ###-Thumbnaiul View. ###-Standalone Player - Has its own activity. ###-Fullscreen Button working. ###-Fullscreen Button is now able to be disabled. ###-Autoplay working. ###-Removed auto hide controls on play. Will add in again at later date. ###-Video listners working. Also they have changed from implementing them all, so implementing select listeners you choose. ###-Layout created, destryoed, paused or resumed listeners are now working.

#Feature List: ####-UI is very similar to what youtube uses as such. ####-Simple and easy to use and setup. ####-Allot of feature to be still implemented. ####-Made around the base MediaPlayer API. So it can play anything and on most devices.

#Module Dependency ####Add the following dependancy to your module build.gradle file, then your set to go.

compile 'nz.co.delacour.exposure-core:exposurevideoplayer:1.0.2'

#More detailed Wiki found here.

#Video Player Setup

Firstly Add this to your layout

<nz.co.delacour.exposurevideoplayer.ExposureVideoPlayer
    android:id="@+id/evp"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

If you have not change any layout settings in the above snippet. The basic base video player will have theses settings.

#####-Autoplay set to false (Disabled). #####-Auto Fullscreen and Fullscreen set to false (Disabled). #####-Color tint of play and pause button set to white. (Default)

###Then... You should be able to work it out from here. ####Wiki is still begin developed so if you have any issues please feel free to email me on [email protected].

 public class MainActivity extends AppCompatActivity implements VideoListeners {

    ExposureVideoPlayer evp;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        evp = (ExposureVideoPlayer) findViewById(R.id.evp);
        evp.init(this);//You must include a Activity here, for the video player will not function correctly.
        evp.setVideoSource(videoSource);
        // Set video source from raw source, evp.setVideoSource("android.resource://" + getPackageName() + "/"+R.raw.big_buck_bunny);
        evp.setOnVideoListeners(this);
        // If you haven't set autoplay to true you can with start the video with one of these,
        // evp.start();
        // Or you can wait for the user to click the play button on screen.
        ...
    }
}

###NOTE: In your code you must include the init() method, for the video player will not function correctly.

#Thumbnail View Setup

    <nz.co.delacour.exposurevideoplayer.ExposureThumbnailView
        android:id="@+id/etv"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

###And again same as above, bit slightly different.

    ExposureThumbnailView etv;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            //Thumbnail view uses the first frame(first milisecond) of video given as source.
            etv = (ExposureThumbnailView) findViewById(R.id.etv);
            etv.setVideoSource("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
            etv.setAutoPlay(true);//Set your video settings if you need them. They carry over the the standalone player.
            etv.setFullScreen(false);
            etv.disableStandalonePlayer(true);//Disables standalone player.
            etv.setOnThumbnailClickListener(new OnThumbnailClickListener() {
                @Override
                public void onClick() {
                    Log.e("Thumbnail: ", "Clicked");
                    //Standlone activity starts here.
                    //Add your own on clicks methods here.
                    //Start activity with video player etc.
                }
            });
        }
        ...

#Things to be added and/or finished in given time. ####-setDisplayHomeAsUpEnabled toolbar action. ####-Automatically resize, little broken at the moment. ####-Batch preloading. ####-Ability to load next video. ####-Override mediaplayer buffer to sort out data saver mode. ####-Ability to take away seekbar and timers. ####-Allot more to come also.

exposure-video-player's People

Contributors

urbanchrisy avatar

Watchers

 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.