Git Product home page Git Product logo

custom-video-player's Introduction

Custom Video Player for Android

Introduction

Custom Video Player is a library with simple and clean controllers that can be embedded anywhere in Android Applications. It can play single or multiple videos from URLs. Added auto mute, auto play to manage video player. Customized controllers and methods.

Documentation

How to import

  1. Clone or download the code & unzip
  2. Go to File > Import Module and import the library as a module.

Add to layout

<com.pavanpathro.custom_video_player.CustomVideoPlayer
    android:id="@+id/customVideoPlayer"
    android:layout_width="match_parent"
    android:layout_height="300dp" />

Initialise Video Player

CustomVideoPlayer customVideoPlayer = findViewById(R.id.customVideoPlayer);

Single Video

customVideoPlayer.setMediaUrl("https://www.rmp-streaming.com/media/bbb-360p.mp4");

Auto Mute (Default - false)

customVideoPlayer.enableAutoMute(true);

Auto Play (Default - true)

customVideoPlayer.enableAutoPlay(false);

Set MinHeight

customVideoPlayer.setMinHeight(300);

Set MaxHeight

customVideoPlayer.setMaxHeight(500);

Manage Controllers (Default - false)

customVideoPlayer.hideControllers(true);

Example

customVideoPlayer.setMediaUrls(listOfVideos)
    .enableAutoMute(false)
    .enableAutoPlay(false)
    .hideControllers(false)
    .setOnPlaybackListener(this)
    .build();

Video Controllers

Play

customVideoPlayer.play();

Pause

customVideoPlayer.pause();

Stop

customVideoPlayer.stop();

Samples

Author

Pavan Kumar Patruni (Email - [email protected])

custom-video-player's People

Contributors

pavankumarpatruni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-video-player's Issues

how to implements into my project

Hi, i find your repository, it's nice and easy, but i don't know how to implements in my proyect for example:

implementation 'com.github.chyrta:AndroidOnboarder:0.7'

Error: no suitable method found for newSimpleInstance line 213

error: no suitable method found for newSimpleInstance(DefaultRenderersFactory,DefaultTrackSelector,DefaultLoadControl)
method ExoPlayerFactory.newSimpleInstance(Context,TrackSelector,LoadControl) is not applicable
(argument mismatch; DefaultRenderersFactory cannot be converted to Context)
method ExoPlayerFactory.newSimpleInstance(Context,RenderersFactory,TrackSelector) is not applicable
(argument mismatch; DefaultRenderersFactory cannot be converted to Context)

Add Custom Video Player to F-Droid

Currently when I search for F-Droid using "custom video player" I get the message

No matching applications available.

I suggest considering the possibility of installing and updating Better Player, including through this distribution platform, as it is free and decentralized, unlike Google Play.

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.