{"id":13612942,"url":"https://github.com/maiwenchang/ArtPlayer","last_synced_at":"2025-04-13T15:32:15.957Z","repository":{"id":42187424,"uuid":"140802085","full_name":"maiwenchang/ArtPlayer","owner":"maiwenchang","description":"Kotlin实现的视频播放器，将MediaPlayer与VideoView解耦合，支持切换播放器内核（如ExoPlayer和ijkPlayer），支持自定义控制视图，提供MediaPlayerManager实现全屏模式，小屏幕模式等。","archived":false,"fork":false,"pushed_at":"2022-03-16T07:52:38.000Z","size":186563,"stargazers_count":593,"open_issues_count":5,"forks_count":102,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-07T21:41:31.540Z","etag":null,"topics":["android","kotlin","media-player","video-player","videoview"],"latest_commit_sha":null,"homepage":"https://maiwenchang.github.io/ArtPlayer/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maiwenchang.png","metadata":{"files":{"readme":"README.English.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-13T05:40:55.000Z","updated_at":"2024-11-07T06:35:18.000Z","dependencies_parsed_at":"2022-09-05T22:22:14.900Z","dependency_job_id":null,"html_url":"https://github.com/maiwenchang/ArtPlayer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maiwenchang%2FArtPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maiwenchang%2FArtPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maiwenchang%2FArtPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maiwenchang%2FArtPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maiwenchang","download_url":"https://codeload.github.com/maiwenchang/ArtPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248735835,"owners_count":21153480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","kotlin","media-player","video-player","videoview"],"created_at":"2024-08-01T20:00:36.882Z","updated_at":"2025-04-13T15:32:10.941Z","avatar_url":"https://github.com/maiwenchang.png","language":"Kotlin","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"English | [简体中文](https://github.com/maiwenchang/ArtVideoPlayer/blob/master/README.md)\n# ArtPlayer\n\n![GitHub top language](https://img.shields.io/github/languages/top/maiwenchang/artPlayer)\n[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://github.com/maiwenchang/ArtVideoPlayer/blob/master/LICENSE)\n[![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=21)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/maiwenchang/ArtPlayer?color=g)\n\n### Introduction\nThis 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.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/maiwenchang/ArtPlayer/raw/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png\"/\u003e\n\u003c/p\u003e\n\n[Full Wiki of ArtPlayer](https://github.com/maiwenchang/ArtPlayer/wiki)\n\n### Features\n- Fullscreen,TinyWindow play\n- Support for playing in RecyclerView\n- Custom UI\n- Global playback in APP\n- Mute\n- Loop Playback\n- Gesture manipulation (small window: single finger drag, double finger zoom; full screen: volume, brightness, fast forward)\n- ijkPlayer support\n- ExoPlayer support\n- Gravity sensor support\n- Raw/Assets, and local playback support\n\n### Getting started\nbasic dependency\n```\nimplementation 'org.salient.artvideoplayer:artplayer-core:1.1.0'\n```\n\nusing ExoPlayer\n```\nimplementation \"org.salient.artvideoplayer:artplayer-exo:1.1.0\"\n```\n\nusing IjkPlayer\n```\nimplementation 'org.salient.artvideoplayer:artplayer-ijk:1.1.0'\nimplementation \"org.salient.artvideoplayer:artplayer-armv7a:1.1.0\"\n```\n\nsupport different cpu architecture\n```\nimplementation \"org.salient.artvideoplayer:artplayer-armv5:1.1.0\"\nimplementation \"org.salient.artvideoplayer:artplayer-x86:1.1.0\"\n//required minSdk version \u003e= 21\nimplementation \"org.salient.artvideoplayer:artplayer-arm64:1.1.0\"\nimplementation \"org.salient.artvideoplayer:artplayer-x86_64:1.1.0\"\n```\n\n### 使用方法\n\nkotlin\n``` kotlin\nimport org.salient.artplayer.VideoView\n\nval videoView = VideoView(context)\nvideoView.mediaPlayer = SystemMediaPlayer().apply{\n    setDataSource(context, Uri.parse(\"http://vfx.mtime.cn/Video/2018/07/06/mp4/180706094003288023.mp4\"))\n}\nvideoView.prepare()\n```\n\n xml\n``` xml\n\u003corg.salient.artplayer.VideoView\n\tandroid:id=\"@+id/video_view\"\n\tandroid:layout_width=\"match_parent\"\n\tandroid:layout_height=\"200dp\"/\u003e\n```\n\n`AndroidManifest.xml`\n``` xml\n\u003cactivity\n    android:name=\".YourActivity\"\n    android:configChanges=\"orientation|screenSize\" /\u003e \u003c!-- required --\u003e\n```\n\nActivity\n``` kotlin\n// block the backpress event of the fullscreen playback\noverride fun onBackPressed() {\n    if (MediaPlayerManager.blockBackPress(this)) {\n        return\n    }\n    super.onBackPressed()\n}\n ```\n\n setup cover\n ``` java\n //If using the ControlPanel，we can get the ImageView of the cover by `findViewById()` method\n //of the ControlPanel which extends FrameLayout：\nGlide.with(context)\n        .load(\"http://img5.mtime.cn/mg/2018/07/06/093947.51483272.jpg\")\n        .into(videoView.cover);\n ```\n\n\n### Support\n- Public technical discussion on github is preferred.[Technical problems](https://github.com/maiwenchang/ArtPlayer/issues)\n- [Wiki](https://github.com/maiwenchang/ArtPlayer/wiki)\n\n### My Build Environment\n- Java 1.8\n- Android Studio 3.6.0\n- Gradle 5.6.4\n- IjkPlayer 0.8.8\n- ExoPlayer 2.11.3\n\n### Authors\n- [maiwenchang](https://github.com/maiwenchang)\n- [ironman6121](https://github.com/ironman6121)\n\n### Contact\n- cv.stronger@gmail.com\n\n### License\n\n```\n   Copyright 2018 maiwenchang\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaiwenchang%2FArtPlayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaiwenchang%2FArtPlayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaiwenchang%2FArtPlayer/lists"}