GithubHelp home page GithubHelp logo

terminawang / artplayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maiwenchang/artplayer

0.0 2.0 0.0 103.6 MB

This is a flexible video player. MediaPlayer is completely separate from VideoView and can be replaced with other player kernels such as ExoPlayer and ijkPlayer. Developers can fully customize the player view, which we call the control panel. In addition, developers can use MediaPlayerManager to control playback behaviours, such as full-screen mode, small screen mode, and smart matching modes in RecyclerView.这是一个小巧灵活的视频播放器。支持全屏,小屏播放;支持重力感应;支持IjkPlayer,支持ExoPlayer;内部支持RecyclerView中播放;自定义UI ;APP内全局播放;静音;循环播放

Home Page: https://github.com/maiwenchang/ArtVideoPlayer

License: Apache License 2.0

Java 100.00%

artplayer's Introduction

English | 简体中文

ArtPlayer

API Hex.pm

This is a flexible video player. MediaPlayer is completely separate from VideoView and can be replaced with other player kernels such as ExoPlayer and ijkPlayer. Developers can fully customize the player view, which we call the control panel. In addition, developers can use MediaPlayerManager to control playback behaviours, such as full-screen mode, small screen mode, and smart matching modes in RecyclerView.

Features

  • Fullscreen,TinyWindow play
  • Support for playing in RecyclerView
  • Custom UI
  • Global playback in APP
  • Mute
  • Loop Playback
  • Gesture manipulation (small window: single finger drag, double finger zoom; full screen: volume, brightness, fast forward)
  • ijkPlayer support
  • ExoPlayer support
  • Gravity sensor support

Preview

Download

Getting started

build.gradle

dependencies {
    // required
    implementation 'org.salient.artvideoplayer:artplayer-java:0.6.0'

    // Default control panel: optional
    implementation 'org.salient.artvideoplayer:artplayer-ui:0.6.0'

     //ijkPlayer: optional
     implementation 'org.salient.artvideoplayer:artplayer-ijk:0.6.0'
     implementation "org.salient.artvideoplayer:artplayer-armv7a:0.6.0"

      //Other ABIs: optional
     implementation "org.salient.artvideoplayer:artplayer-armv5:0.6.0"
     implementation "org.salient.artvideoplayer:artplayer-x86:0.6.0"
     // Other ABIs: optional (minSdk version >= 21)
     implementation "org.salient.artvideoplayer:artplayer-arm64:0.6.0"
     implementation "org.salient.artvideoplayer:artplayer-x86_64:0.6.0"

     //ExoPlayer2 : optional
     implementation "org.salient.artvideoplayer:artplayer-exo:0.6.0"
}

Usage

java

import org.salient.artplayer.VideoView;

VideoView videoView = new VideoView(this);
videoView.setUp("http://vfx.mtime.cn/Video/2018/06/27/mp4/180627094726195356.mp4");
videoView.setControlPanel(new ControlPanel(this));
videoView.start();

xml

<org.salient.artplayer.VideoView
  android:id="@+id/video_view"
  android:layout_width="match_parent"
  android:layout_height="200dp"/>

AndroidManifest.xml

<activity
  android:name=".YourActivity"
  android:configChanges="orientation|screenSize" /> <!-- required -->

Activity

@Override
public void onBackPressed() {
  if (MediaPlayerManager.instance().backPress(this)) {
      return;
  }
  super.onBackPressed();
}

@Override
protected void onPause() {
  super.onPause();
  MediaPlayerManager.instance().pause();
}

@Override
protected void onDestroy() {
  super.onDestroy();
  MediaPlayerManager.instance().releasePlayerAndView(this);
}

ON-PLAN

  • Audio playback
  • Kotlin version

NOT-ON-PLAN(不在计划)

  • Multiple MediaPlayer playback

Support (支持)

My Build Environment

  • Java 1.7
  • Android Studio 3.1.2
  • Gradle 4.4
  • IjkPlayer 0.8.8
  • ExoPlayer 2.8.3

Authors

Contact

License

   Copyright 2018 maiwenchang

   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.

artplayer's People

Contributors

ironman6121 avatar maiwenchang 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.