Breaking change: Custom settings menu has slot name now

This commit is contained in:
Korbs 2024-11-29 22:30:16 -05:00
parent 2370518319
commit 29aaefd4f7
2 changed files with 20 additions and 11 deletions

View file

@ -11,6 +11,8 @@ const {
VideoAttributes, VideoAttributes,
AudioAttributes, AudioAttributes,
ShowBackAndForward,
YouTube = false, YouTube = false,
YouTubeQuality = '137', YouTubeQuality = '137',
Invidious, Invidious,
@ -68,12 +70,16 @@ import './Styles/Iconoir.css'
null null
} }
{SettingsMenu ? {SettingsMenu ?
<Controls PlayerName={PlayerName} Live={Live}> <Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}>
<button id="open-zorn-settings-button" onclick="OpenZornMenu()"><i class="iconoir-settings"></i></button> <button id="open-zorn-settings-button" onclick="OpenZornMenu()"><i class="iconoir-settings"></i></button>
<slot/> <div id="settings" class="vc-menu">
<slot name="menu"/>
{Whitelabel ? <a class="vc-menu-whitelabel" aria-label="Zorn Player Whitelabel" href="https://studio.sudovanilla.org/" target="_blank">Zorn Player</a> : null}
</div>
<slot name="extra-menus"/>
</Controls> </Controls>
: :
<Controls PlayerName={PlayerName} Live={Live}/> <Controls ShowBackAndForward={ShowBackAndForward} PlayerName={PlayerName} Live={Live}/>
} }
<Controller PlayerName={PlayerName}/> <Controller PlayerName={PlayerName}/>
<Seek PlayerName={PlayerName}/> <Seek PlayerName={PlayerName}/>

View file

@ -14,8 +14,9 @@ import {Zorn} from '@minpluto/zorn'
Video="https://ocean.sudovanilla.org/media/videos/Ennie%20and%20Yoyki/Ennie%20and%20Yoyki%3A%20Non-Girly%20Games.mp4" Video="https://ocean.sudovanilla.org/media/videos/Ennie%20and%20Yoyki/Ennie%20and%20Yoyki%3A%20Non-Girly%20Games.mp4"
CustomControlsWithMenu CustomControlsWithMenu
SettingsMenu SettingsMenu
Whitelabel
> >
<div id="settings" class="vc-menu"> <slot slot="menu">
<button>Stats for Geeks</button> <button>Stats for Geeks</button>
<hr/> <hr/>
<button>Open Video URL <i class="iconoir-arrow-up-right"></i></button> <button>Open Video URL <i class="iconoir-arrow-up-right"></i></button>
@ -25,13 +26,15 @@ import {Zorn} from '@minpluto/zorn'
<button id="has-switch">Milieu <i class="iconoir-switch-off"></i></button> <button id="has-switch">Milieu <i class="iconoir-switch-off"></i></button>
<button>Close Captions <i class="iconoir-nav-arrow-right"></i></button> <button>Close Captions <i class="iconoir-nav-arrow-right"></i></button>
<button onclick="PlayerMenu_Quality()">Quality <i class="iconoir-nav-arrow-right"></i></button> <button onclick="PlayerMenu_Quality()">Quality <i class="iconoir-nav-arrow-right"></i></button>
</div> </slot>
<div id="quality-changer" class="vc-menu"> <slot slot="extra-menus">
<button onclick="OpenZornMenu()"><span style="display: flex; align-items: center;"><i class="iconoir-nav-arrow-left"></i> Back</span></button> <div id="quality-changer" class="vc-menu">
<button>1080p</button> <button onclick="OpenZornMenu()"><span style="display: flex; align-items: center;"><i class="iconoir-nav-arrow-left"></i> Back</span></button>
<button>720p</button> <button>1080p</button>
<button>360p</button> <button>720p</button>
</div> <button>360p</button>
</div>
</slot>
</Zorn> </Zorn>
<slot slot="info"> <slot slot="info">
<p>Source: <a href="https://www.youtube.com/watch?v=MuyJtxzyU3o">YouTube</a></p> <p>Source: <a href="https://www.youtube.com/watch?v=MuyJtxzyU3o">YouTube</a></p>