-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tauri): implement fullscreen toggle functionality (#2572)
Implements full window's fullscreen functionality inside @jellyfin-vue/tauri-runtime package Signed-off-by: Fernando Fernández <ferferga@hotmail.com> Co-authored-by: sean <sean.mcbroom@outlook.com>
- Loading branch information
1 parent
7df79ee
commit 8e8cba9
Showing
11 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
This is the package that provides a build from `@jellyfin-vue/frontend` with all the Tauri-specific | ||
code, since `@jellyfin-vue/frontend` must not have any code that doesn't belong to the DOM/Browser environment. | ||
|
||
It works by injecting the Tauri logic into the standard `document`, `window` or `globalThis` objects | ||
(or any other relevant global) and loading those modules before the frontend's one, so Tauri code is loaded | ||
always first. | ||
|
||
See `entrypoint.ts` and `src/fullscreen.ts` for an example. | ||
|
||
Every "polyfilled" feature must be in their own module to keep the logic simple enough. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { getCurrentWindow } from '@tauri-apps/api/window'; | ||
|
||
Element.prototype.requestFullscreen = async () => getCurrentWindow().setFullscreen(true); | ||
Document.prototype.exitFullscreen = async () => getCurrentWindow().setFullscreen(false); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters