gradle.properties
增加编译配置:android.enableDexingArtifactTransform=false
KtvPlayerConfig.getInstance().setScoreFactor(float factor)
onPlayerError
或onExecuteFail
onShowPicture
接口显示大图。<style name="Theme.Transparent" parent="android:Theme.Translucent.NoTitleBar">
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.8</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
</style>
KtvPlayerConfig.getInstance().useOpenGL(true)
gradle-6.9-all
.classpath "com.android.tools.build:gradle:3.6.0"
//复制自ExoPlayer仓库,与ExoPlayer-2.18.5配套使用。
implementation ("com.google.guava:guava:31.0.1-android") {
// Exclude dependencies that are only used by Guava at compile time
// (but declared as runtime deps) [internal b/168188131].
exclude group: 'com.google.code.findbugs', module: 'jsr305'
exclude group: 'org.checkerframework', module: 'checker-compat-qual'
exclude group: 'org.checkerframework', module: 'checker-qual'
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
}
finalInputInstaller
,看类名。qua: V1_ATV_KG_2.1.02_23_100074_A, appId: 100074, hostId: common, isProductEnv: false, isDevMode: true, buildInfo: null_2024_02_20 15:17:37, deviceInfo{SDK_INT: 31BRAND: HUAWEIMODEL: NOH-AN00MANUFACTURER: HUAWEIDEVICE: HWNOH}, hostVersionName: 2.1.02.23, uid: , hostChannelId: DE_SAI
com.tme.ktv.api.KtvSdk#getSdkImei()
KtvSdk.setProductEnv(false)
方法来切换,重启应用后生效。LyricController.getInstance().addLyricListener(object : LyricListener {
override fun OnLyricTextUpdate(text: String?) {
//歌词单句回调
Logger.d(TAG, "OnLyricTextUpdate $text")
}
override fun OnLyricCountDown(countDown: Int) {
//跳过前奏倒计时 比如5000代表 还有5s开始显示歌词
Logger.d(TAG, "OnLyricCountDown $countDown")
}
})