Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
CrystalSpire authored and succlz123 committed Oct 6, 2022
0 parents commit 6cbf1f1
Show file tree
Hide file tree
Showing 135 changed files with 8,877 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store

jcef-bundle
imageCache
file-download
.idea/

local.properties
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# AcFun Client Multiplatform

这是一个旨在使用 Compose 技术来构建一个多平台的在线流媒体客户端, 同时支持 Android Phone,Android Pad, Android TV, Windows, Mac OS, Linux,目标达到 90% UI 代码的通用率,包括接口请求和弹幕显示等。

# Download

https://github.com/succlz123/AcFun-Client-Multiplatform/releases

# Feature

- 首页展示
- 分区内容展示
- 视频详情展示
- UP主投稿视频查看
- 视频播放
- 直播
- 搜索
- 支持播放多清晰度选择
- 播放功能增强,变速,音量调节等
- 分区支持筛选排序
- 弹幕 (简易弹幕-实验/Experimental)
- Android Phone, Android Pad,Desktop 适配
- 下载

# Todo

- 支持播放选集功能
- Android TV 适配
- DLNA 投屏
- 番剧
- 文章区

# Screenshot

## 桌面和平板

<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/1.png?raw=true" width="750" height="500"/><br/>

## 手机
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/9.png?raw=true" width="360" height="800"/><br/>

## 下载

<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/15.png?raw=true" width="750" height="500"/><br/>

## 播放和弹幕
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/12.png?raw=true" width="750" height="500"/><br/>
3 changes: 3 additions & 0 deletions android/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions android/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions android/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions android/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
plugins {
id("org.jetbrains.compose")
id("com.android.application")
kotlin("android")
}

group = "io.github.succlz123"
version = "1.0.3"

repositories {
mavenCentral()
google()
google()
maven("https://jitpack.io")
}

dependencies {
implementation(project(":shared"))
implementation("androidx.activity:activity-compose:1.6.0")
implementation("androidx.compose.material:material:1.2.1")
implementation("androidx.compose.foundation:foundation:1.2.1")
}

android {
compileSdk = 33
defaultConfig {
applicationId = "org.succlz123.app.acfun"
minSdk = 24
targetSdk = 30
versionCode = 3
versionName = "1.0.3"

// resourceConfigurations += ["en", "zh"]
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}

signingConfigs {
getByName("debug") {
storeFile = file("${project.rootDir}/security/android-debug.keystore")
storePassword = "android"
keyAlias = "key"
keyPassword = "android"
}
register("release") {
storeFile = file("${project.rootDir}/security/android-debug.keystore")
storePassword = "android"
keyAlias = "key"
keyPassword = "android"
}
}
buildTypes {
getByName("debug") {
applicationIdSuffix = ".debug"
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = false
}
getByName("release") {
isMinifyEnabled = false
isDebuggable = false
ndk {
abiFilters += "arm64-v8a"
}
signingConfig = signingConfigs.getByName("release")
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt")
}
}
}
24 changes: 24 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.succlz123.app.acfun">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>

<application
android:allowBackup="false"
android:supportsRtl="true"
android:name="org.succlz123.app.acfun.MainApplication"
android:label="AcFun"
android:icon="@mipmap/ic_launcher_round"
android:largeHeap="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name="org.succlz123.app.acfun.MainActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
36 changes: 36 additions & 0 deletions android/src/main/java/org/succlz123/app/acfun/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.succlz123.app.acfun

import android.os.Build
import android.os.Bundle
import android.view.MotionEvent
import android.view.WindowManager
import androidx.activity.compose.setContent
import androidx.appcompat.app.AppCompatActivity
import org.succlz123.lib.screen.ScreenContainer

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN)
val decorView = window.decorView
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
window.attributes.layoutInDisplayCutoutMode =
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
}
toggleHideBar(decorView)

setContent {
ScreenContainer(this, this, this, this) {
SharedMainContent()
}
}
}

override fun onTouchEvent(event: MotionEvent?): Boolean {
return super.onTouchEvent(event)
}
}

17 changes: 17 additions & 0 deletions android/src/main/java/org/succlz123/app/acfun/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.succlz123.app.acfun

import android.app.Application
import org.succlz123.hohoplayer.config.PlayerConfig
import org.succlz123.hohoplayer.core.player.ext.exo.ExoMediaPlayer
import org.succlz123.lib.app.AppContentHolder

class MainApplication : Application() {

override fun onCreate() {
super.onCreate()
AppContentHolder.init(this)
ExoMediaPlayer.addThis(true)
PlayerConfig.init(this, true)
PlayerConfig.isUseDefaultNetworkEventProducer = true
}
}
Loading

0 comments on commit 6cbf1f1

Please sign in to comment.