0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch.git synced 2024-12-22 05:12:57 -05:00

feat(vod): added handlePlayerTimeUpdate back

This commit is contained in:
Seraph91P 2024-08-10 13:28:13 +02:00
parent 43739a3537
commit 467f16824c

View file

@ -9,12 +9,12 @@ import FollowButton from '@/components/FollowButton.vue'
import LoadingScreen from '@/components/LoadingScreen.vue' import LoadingScreen from '@/components/LoadingScreen.vue'
import AboutTab from '@/components/user/AboutTab.vue' import AboutTab from '@/components/user/AboutTab.vue'
import ShareModal from '@/components/popups/ShareButtonModal.vue' import ShareModal from '@/components/popups/ShareButtonModal.vue'
import TheatreModeToggle from '@/components/TheatreModeToggle.vue' import VueTitle from '@/components/VueTitle.vue'
import ActionButtons from '@/components/ActionButtons.vue'
import type { Video } from '@/types' import type { Video } from '@/types'
import { truncate, abbreviate, getEndpoint } from '@/mixins' import { truncate, abbreviate, getEndpoint } from '@/mixins'
import { getSetting } from '@/settingsManager' import { getSetting } from '@/settingsManager'
import VueTitle from '@/components/VueTitle.vue'
interface ChatComponent { interface ChatComponent {
updateVodComments: (time: number) => void updateVodComments: (time: number) => void
@ -66,7 +66,7 @@ export default {
AboutTab, AboutTab,
ShareModal, ShareModal,
VueTitle, VueTitle,
TheatreModeToggle ActionButtons
}, },
methods: { methods: {
truncate, truncate,
@ -105,12 +105,15 @@ export default {
<vue-title :title="'VOD - ' + data.title"></vue-title> <vue-title :title="'VOD - ' + data.title"></vue-title>
<div <div
:class="[ :class="[
'flex bg-crust flex-col p-6 rounded-lg w-[99vw] text-contrast', 'flex bg-crust flex-col p-6 rounded-lg w-full text-contrast',
isTheatreMode ? 'md:max-w-[95rem] lg:max-w-[100rem] xl:max-w-[120rem] 2x:max-w-[140rem]' : 'md:max-w-prose md:min-w-[65ch] lg:max-w-[70rem] xl:max-w-[80rem] 2x:max-w-[90rem]' isTheatreMode
? 'md:w-[62vw] lg:w-[75vw] xl:w-[75vw] 2xl:w-[68vw]'
: 'md:w-[80vw] lg:w-[70vw] xl:w-[60vw] 2xl:w-[50vw] max-w-[1200px]'
]" ]"
> >
<div class="w-full mx-auto rounded-lg mb-5"> <div class="w-full mx-auto rounded-lg mb-5">
<video-player :options="videoOptions"> </video-player> <video-player :options="videoOptions" @PlayerTimeUpdate="handlePlayerTimeUpdate">
</video-player>
</div> </div>
<div class="w-full flex-wrap md:p-3"> <div class="w-full flex-wrap md:p-3">
@ -141,12 +144,13 @@ export default {
</p> </p>
</div> </div>
<button @click="toggleShareModal" class="px-2 py-1.5 rounded-lg bg-purple"> <action-buttons
<v-icon name="fa-share-alt"></v-icon> :showDownload="false"
</button> :showTheatreMode="true"
<button @click="toggleTheatreMode" class="px-2 py-1.5 rounded-lg bg-purple"> :showShare="true"
<v-icon name="fa-expand"></v-icon> @toggleTheatreMode="toggleTheatreMode"
</button> @toggleShareModal="toggleShareModal"
/>
</div> </div>
</div> </div>