Skip to content

这是一个灵活的视频播放器。支持全屏,小屏播放;内部支持RecyclerView中播放;自定义UI ;APP内全局播放;静音;循环播放

License

Notifications You must be signed in to change notification settings

qzqs/ArtVideoPlayer

 
 

Repository files navigation

ArtVideoPlayer

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.

这是一个灵活的视频播放器。 MediaPlayer与VideoView完全分开,可以替换为其他播放器内核,如ExoPlayer和ijkPlayer。 可以完全自定义播放器视图,我们称之为控制面板。 此外,可以使用MediaPlayerManager来控制播放行为,例如全屏模式,小屏幕模式以及RecyclerView中的智能匹配模式。

Features

  • 全屏,小屏播放
  • 内部支持RecyclerView中播放
  • 自定义UI
  • APP内全局播放
  • 静音
  • 循环播放
  • 手势操作

Preview

列表播放

keep pause stop minify
image image image image

Download

Getting started

build.gradle

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

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

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

  • 视频画面比例
  • ijkPlayer支持
  • ExoPlayer支持
  • 音频播放
  • Kotlin版本

NOT-ON-PLAN(不在计划)

  • Multiple MediaPlayer playback
  • 多播放器播放

Support (支持)

  • Public technical discussion on github is preferred.
  • 请在 github 上公开讨论技术问题

My Build Environment

  • Java 1.7
  • Android Studio 3.1.2
  • Gradle 3.1.2

Authors

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.

About

这是一个灵活的视频播放器。支持全屏,小屏播放;内部支持RecyclerView中播放;自定义UI ;APP内全局播放;静音;循环播放

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%