mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-18 23:22:05 +00:00
feat: playing video in fullscreen when clicking from cards
This commit is contained in:
parent
eab10e660f
commit
ebf20f4549
3 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,8 @@
|
|||
import { liveAnimeEpisodeProgress } from '@/modules/animeprogress.js'
|
||||
import { anilistClient } from '@/modules/anilist.js'
|
||||
import { isMobile } from '@/Router.svelte'
|
||||
import { SUPPORTS } from '@/modules/support';
|
||||
|
||||
export let data
|
||||
|
||||
let preview = false
|
||||
|
|
@ -18,6 +20,7 @@
|
|||
const view = getContext('view')
|
||||
function viewMedia () {
|
||||
$view = media
|
||||
if (SUPPORTS.isAndroid) document.fullscreenElement ? document.exitFullscreen() : document.querySelector('.content-wrapper').requestFullscreen()
|
||||
}
|
||||
function setHoverState (state) {
|
||||
preview = state
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import { formatMap, statusColorMap } from '@/modules/anime.js'
|
||||
import { click } from '@/modules/click.js'
|
||||
import { countdown } from '@/modules/util.js'
|
||||
import { SUPPORTS } from '@/modules/support';
|
||||
import { page } from '@/App.svelte'
|
||||
/** @type {import('@/modules/al.d.ts').Media} */
|
||||
export let media
|
||||
|
|
@ -10,6 +11,7 @@
|
|||
const view = getContext('view')
|
||||
function viewMedia () {
|
||||
$view = media
|
||||
if (SUPPORTS.isAndroid) document.fullscreenElement ? document.exitFullscreen() : document.querySelector('.content-wrapper').requestFullscreen()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
import { formatMap, statusColorMap } from '@/modules/anime.js'
|
||||
import { hoverClick } from '@/modules/click.js'
|
||||
import { countdown } from '@/modules/util.js'
|
||||
import { SUPPORTS } from '@/modules/support';
|
||||
|
||||
import { page } from '@/App.svelte'
|
||||
/** @type {import('@/modules/al.d.ts').Media} */
|
||||
|
|
@ -13,6 +14,7 @@
|
|||
const view = getContext('view')
|
||||
function viewMedia () {
|
||||
$view = media
|
||||
if (SUPPORTS.isAndroid) document.fullscreenElement ? document.exitFullscreen() : document.querySelector('.content-wrapper').requestFullscreen()
|
||||
}
|
||||
function setHoverState (state) {
|
||||
preview = state
|
||||
|
|
|
|||
Loading…
Reference in a new issue