项目作者: PavanKumarPatruni

项目描述 :
Android Custom Video Player
高级语言: Java
项目地址: git://github.com/PavanKumarPatruni/custom-video-player.git
创建时间: 2018-04-15T17:06:30Z
项目社区:https://github.com/PavanKumarPatruni/custom-video-player

开源协议:

下载


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

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

Initialise Video Player

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

Single Video

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

Auto Mute (Default - false)

  1. customVideoPlayer.enableAutoMute(true);

Auto Play (Default - true)

  1. customVideoPlayer.enableAutoPlay(false);

Set MinHeight

  1. customVideoPlayer.setMinHeight(300);

Set MaxHeight

  1. customVideoPlayer.setMaxHeight(500);

Manage Controllers (Default - false)

  1. customVideoPlayer.hideControllers(true);

Example

  1. customVideoPlayer.setMediaUrls(listOfVideos)
  2. .enableAutoMute(false)
  3. .enableAutoPlay(false)
  4. .hideControllers(false)
  5. .setOnPlaybackListener(this)
  6. .build();

Video Controllers

Play

  1. customVideoPlayer.play();

Pause

  1. customVideoPlayer.pause();

Stop

  1. customVideoPlayer.stop();

Samples



Author


Pavan Kumar Patruni (Email - pavanpathro@gmail.com)