Skip to content

Commit

Permalink
web: In V1, rename enterFullscreen to requestFullscreen, remove setFu…
Browse files Browse the repository at this point in the history
…llscreen
  • Loading branch information
Dinnerbone committed Oct 6, 2024
1 parent dd2fa0f commit 875e781
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion web/packages/core/src/internal/player/impl_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class PlayerV1Impl implements PlayerV1 {
this.#inner.setFullscreen(isFull);
}

enterFullscreen(): void {
requestFullscreen(): void {
this.#inner.enterFullscreen();
}

Expand Down
4 changes: 2 additions & 2 deletions web/packages/core/src/public/player/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export interface LegacyRuffleAPI {
* @param isFull Whether to set to fullscreen or return to normal.
* @deprecated Please use {@link PlayerElement.ruffle | ruffle()} to access a versioned API.
* This method may be replaced by Flash and is not guaranteed to exist.
* A direct replacement is {@link PlayerV1.setFullscreen}
* A direct replacement is {@link PlayerV1.requestFullscreen} or {@link PlayerV1.exitFullscreen}.
*/
setFullscreen(isFull: boolean): void;

Expand All @@ -192,7 +192,7 @@ export interface LegacyRuffleAPI {
*
* @deprecated Please use {@link PlayerElement.ruffle | ruffle()} to access a versioned API.
* This method may be replaced by Flash and is not guaranteed to exist.
* A direct replacement is {@link PlayerV1.enterFullscreen}
* A direct replacement is {@link PlayerV1.requestFullscreen}
*/
enterFullscreen(): void;

Expand Down
12 changes: 2 additions & 10 deletions web/packages/core/src/public/player/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface PlayerV1 {
/**
* Checks if this player is allowed to be fullscreen by the browser.
*
* @returns True if you may call {@link enterFullscreen}.
* @returns True if you may call {@link requestFullscreen}.
*/
get fullscreenEnabled(): boolean;

Expand All @@ -98,20 +98,12 @@ export interface PlayerV1 {
*/
get isFullscreen(): boolean;

/**
* Exported function that requests the browser to change the fullscreen state if
* it is allowed.
*
* @param isFull Whether to set to fullscreen or return to normal.
*/
setFullscreen(isFull: boolean): void;

/**
* Requests the browser to make this player fullscreen.
*
* This is not guaranteed to succeed, please check {@link fullscreenEnabled} first.
*/
enterFullscreen(): void;
requestFullscreen(): void;

/**
* Requests the browser to no longer make this player fullscreen.
Expand Down

0 comments on commit 875e781

Please sign in to comment.