Skip to content

Commit

Permalink
fix:修改disableFocus属性没有效果的问题 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
longgegege authored Sep 18, 2024
1 parent 57e9bca commit e76e6dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions harmony/rn_video/src/main/ets/controller/VideoController.ets
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ export class VideoController {
this.onVideoLoadStart(JSON.stringify(this.url));
break;
case AvplayerStatus.INITIALIZED:
if(this.playerThis.disableFocus){
let audioRendererInfo = {
usage: audio.StreamUsage.STREAM_USAGE_GAME,
rendererFlags: 0
} as audio.AudioRendererInfo;
this.avPlayer.audioRendererInfo = audioRendererInfo;
}
this.onVideoLoadStart(JSON.stringify(this.url));
this.avPlayer.surfaceId = String(this.surfaceId);
this.avPlayer.prepare();
Expand Down

0 comments on commit e76e6dc

Please sign in to comment.