English | [简体中文](https://github.com/maiwenchang/ArtVideoPlayer/blob/master/README.md) # ArtPlayer ![GitHub top language](https://img.shields.io/github/languages/top/maiwenchang/artPlayer) [![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/maiwenchang/ArtVideoPlayer/blob/master/LICENSE) [![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=21) ![GitHub release (latest by date)](https://img.shields.io/github/v/release/maiwenchang/ArtPlayer?color=g) ### Introduction 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.
[Full Wiki of ArtPlayer](https://github.com/maiwenchang/ArtPlayer/wiki) ### 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 - Raw/Assets, and local playback support ### Getting started basic dependency ``` implementation 'org.salient.artvideoplayer:artplayer-core:1.1.0' ``` using ExoPlayer ``` implementation "org.salient.artvideoplayer:artplayer-exo:1.1.0" ``` using IjkPlayer ``` implementation 'org.salient.artvideoplayer:artplayer-ijk:1.1.0' implementation "org.salient.artvideoplayer:artplayer-armv7a:1.1.0" ``` support different cpu architecture ``` implementation "org.salient.artvideoplayer:artplayer-armv5:1.1.0" implementation "org.salient.artvideoplayer:artplayer-x86:1.1.0" //required minSdk version >= 21 implementation "org.salient.artvideoplayer:artplayer-arm64:1.1.0" implementation "org.salient.artvideoplayer:artplayer-x86_64:1.1.0" ``` ### 使用方法 kotlin ``` kotlin import org.salient.artplayer.VideoView val videoView = VideoView(context) videoView.mediaPlayer = SystemMediaPlayer().apply{ setDataSource(context, Uri.parse("http://vfx.mtime.cn/Video/2018/07/06/mp4/180706094003288023.mp4")) } videoView.prepare() ``` xml ``` xml