Skip to content

Commit

Permalink
feat: dorion fullscreen (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Dec 19, 2023
1 parent 3052ea1 commit c3f1c76
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Shelter plugin repo housing both general-use plugins AND [Dorion](https://github
* [No Reply Mention](#no-reply-mention)
* [shelteRPC](#shelterpc)
* [Dorion Plugins](#dorion-plugins)
* [Dorion Fullscreen](#dorion-fullscreen)
* [Dorion Settings](#dorion-settings)
* [Dorion Streamer Mode](#dorion-streamer-mode)
* [Dorion Notifications](#dorion-notifications)
Expand Down Expand Up @@ -73,6 +74,12 @@ arRPC replication for Shelter. Only really useful on web Discord, and if you are

(you don't want these next plugins, they are for the [Dorion client](https://github.com/SpikeHD/Dorion))

## Dorion Fullscreen

Tweak Fullscreen behaviour in Dorion.

`https://spikehd.github.io/shelter-plugins/dorion-fullscreen/`

## Dorion Settings

Settings menus and interaction for Dorion.
Expand Down
22 changes: 22 additions & 0 deletions plugins/dorion-fullscreen/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const {
flux: {
dispatcher: FluxDispatcher
},
} = shelter

const {
window: {
appWindow
}
} = (window as any).__TAURI__

const toggleFullscreen = async (payload) => {
const isFullscreen = payload?.properties?.video_layout === 'full-screen'
appWindow?.setFullscreen(isFullscreen)
}

FluxDispatcher.subscribe('TRACK', toggleFullscreen)

export const onUnload = () => {
FluxDispatcher.unsubscribe('TRACK', toggleFullscreen)
}
5 changes: 5 additions & 0 deletions plugins/dorion-fullscreen/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Dorion Fullscreen",
"author": "SpikeHD",
"description": "Tweak Fullscreen behaviour in Dorion."
}

0 comments on commit c3f1c76

Please sign in to comment.