Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video player position gets displaced when entering fullscreen (Web) #17914

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cocos/video/video-player-impl-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
public syncClip (clip: any): void {
this.removeVideoPlayer();
if (!clip) { return; }
this.createVideoPlayer(clip.nativeUrl);

Check failure on line 114 in cocos/video/video-player-impl-web.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe argument of type `any` assigned to a parameter of type `string`
}

public syncURL (url: string): void {
Expand Down Expand Up @@ -206,7 +206,7 @@
// Monitor video entry and exit full-screen events
video.setAttribute('x5-video-player-fullscreen', 'true');
// eslint-disable-next-line @typescript-eslint/no-floating-promises
screen.requestFullScreen(video, (document) => {

Check failure on line 209 in cocos/video/video-player-impl-web.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Unsafe argument of type `any` assigned to a parameter of type `HTMLElement`
const fullscreenElement = sys.browserType === BrowserType.IE ? document.msFullscreenElement : document.fullscreenElement;
this._fullScreenOnAwake = (fullscreenElement === video);
}, () => {
Expand Down Expand Up @@ -330,10 +330,6 @@
return;
}

if (screen.fullScreen()) {
return;
}

// use stayOnBottom
if (this._dirty) {
this._dirty = false;
Expand Down
Loading