Skip to content

Commit

Permalink
fix:修改video的宽高改变之后视频被截取问题 (#71)
Browse files Browse the repository at this point in the history
Co-authored-by: zhangweilong <[email protected]>
  • Loading branch information
longgegege and zhangweilong authored Sep 13, 2024
1 parent f07facc commit 6dedf99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class VideoController {
}else{
this.avPlayer.fdSrc = this.url;
}
this.onVideoLoadStart(this.url);
this.onVideoLoadStart(JSON.stringify(this.url));
break;
case AvplayerStatus.INITIALIZED:
this.onVideoLoadStart(JSON.stringify(this.url));
Expand Down
7 changes: 3 additions & 4 deletions harmony/rn_video/src/main/ets/view/PlayPlayer.ets
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export struct PlayPlayer {
@Consume('volumeVar') @Watch("onChanged") volume: number;
@Consume('resizeModeVar') @Watch("onChanged") resizeMode:string;
@Consume('disableFocusVar') @Watch("onChanged") disableFocus: boolean;
@Consume @Watch("onChanged") changedViewWidth: number;
@Consume @Watch("onChanged") changedViewHeight: number;
@Consume('preventsDisplaySleepDuringVideoPlaybackVar') @Watch("setPreventsDisplaySleepDuringVideoPlaybackModifier") preventsDisplaySleepDuringVideoPlayback: boolean;

@State bright: number = PlayConstants.PLAY_PAGE.BRIGHT;
Expand All @@ -79,10 +81,7 @@ export struct PlayPlayer {

viewWidth: number = 0;
viewHeight: number = 0;
@Consume
changedViewWidth: number;
@Consume
changedViewHeight: number;


private orientationChange: boolean = true;

Expand Down

0 comments on commit 6dedf99

Please sign in to comment.