Skip to content

AndroidStudioIst/Aplayer

Repository files navigation

Aplayer

基于迅雷Aplayer封装

引用方式:
allprojects {
 repositories {
   ...
      maven { url 'https://www.jitpack.io' }
   }
 }
dependencies {
 implementation 'com.github.W252016021:Aplayer:1.2.0'
}
调用播放:
new APlayer(this).setTitle(fileModel.getFileName()).setUrl(fileModel.getFilePath()).setResquestCode(201).start();
//201用于回调播放完成事件,可空

@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
 super.onActivityResult(requestCode, resultCode, data);
 Log.e("info", "onActivityResult: requestCode->" + requestCode + "|resultCode->" + resultCode);
 if (requestCode == 201) {
    Toast.makeText(this, "播放完毕", Toast.LENGTH_SHORT).show();
   }
}
混淆规则:
-keep class com.aplayer.** {*;}

演示图片 演示图片 演示图片

About

迅雷Aplayer UI封装

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages