!3941 【openharmony】【AVSession】【Sample】10的项目中用了11的接口

Merge pull request !3941 from Fall_Y/master
This commit is contained in:
openharmony_ci 2024-01-22 08:20:05 +00:00 committed by Gitee
commit c962e318f5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 5 additions and 4 deletions

View File

@ -20,8 +20,8 @@
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": 10,
"compatibleSdkVersion": 10,
"compileSdkVersion": 11,
"compatibleSdkVersion": 11,
"runtimeOS": "OpenHarmony"
}
],

View File

@ -72,7 +72,7 @@ export default class AudioUtils {
if (this.callbackMap.get('prepared')) {
this.callbackMap.get('prepared');
Log.info('AVPlayer state prepare start.');
this.callbackMap.set('prepared', null);
this.callbackMap.set('prepared', ()=>{});
}
break;
case 'playing':

View File

@ -55,6 +55,7 @@ struct Index {
@State hasNetwork: boolean = false;
@State isProgressSliding: boolean = false;
@State audioType: 'url' | 'rawfile' | 'scan' | 'video' = 'url';
@State avCastPickerColor:Color = Color.White;
private audioUtils: AudioUtils = new AudioUtils();
private avPlayer: media.AVPlayer | undefined = undefined;
private audioVolumeGroupManager: audio.AudioVolumeGroupManager | undefined = undefined;
@ -769,7 +770,7 @@ struct Index {
.fillColor(Color.White)
.backgroundColor(Color.Black)
} else {
AVCastPicker({ normalColor:Color.White, activeColor:Color.White })
AVCastPicker({ normalColor: this.avCastPickerColor, activeColor: this.avCastPickerColor })
.size({ height: '100%', width: '100%' })
.backgroundColor(Color.Black)
.align(Alignment.Center);