mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-20 08:02:12 +00:00
feat: defaults to fullscreen on mobile
This commit is contained in:
parent
695985de19
commit
666e635fef
3 changed files with 11 additions and 2 deletions
|
|
@ -1108,7 +1108,7 @@
|
|||
<div class='w-full h-full position-absolute toggle-fullscreen' on:dblclick={toggleFullscreen} on:click|self={() => { if (page === 'player') playPause(); page = 'player' }} />
|
||||
<!-- eslint-disable-next-line svelte/valid-compile -->
|
||||
<div class='w-full h-full position-absolute toggle-immerse d-none' on:dblclick={toggleFullscreen} on:click|self={toggleImmerse} />
|
||||
<div class='w-full h-full position-absolute mobile-focus-target d-none' use:click={() => { page = 'player' }} />
|
||||
<div class='w-full h-full position-absolute mobile-focus-target d-none' use:click={() => { page = 'player'; toggleFullscreen() }} />
|
||||
<span class='material-symbols-outlined ctrl h-full align-items-center justify-content-end w-150 mw-full mr-auto' use:click={rewind}> fast_rewind </span>
|
||||
<span class='material-symbols-outlined ctrl' data-name='playPause' use:click={playPause}> {ended ? 'replay' : paused ? 'play_arrow' : 'pause'} </span>
|
||||
<span class='material-symbols-outlined ctrl h-full align-items-center w-150 mw-full ml-auto' use:click={forward}> fast_forward </span>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<script context='module'>
|
||||
import { click } from '@/modules/click.js'
|
||||
import { fastPrettyBytes, since } from '@/modules/util.js'
|
||||
import { SUPPORTS } from '@/modules/support.js'
|
||||
|
||||
/** @typedef {import('@thaunknown/ani-resourced/sources/types.d.ts').Result} Result */
|
||||
/** @typedef {import('anitomyscript').AnitomyResult} AnitomyResult */
|
||||
|
|
@ -75,7 +76,13 @@
|
|||
export let play
|
||||
</script>
|
||||
|
||||
<div class='card bg-dark p-15 d-flex mx-0 overflow-hidden pointer mb-10 mt-0 position-relative scale' use:click={() => play(result)} title={result.parseObject.file_name}>
|
||||
<div class='card bg-dark p-15 d-flex mx-0 overflow-hidden pointer mb-10 mt-0 position-relative scale'
|
||||
use:click={() => {
|
||||
play(result)
|
||||
if (SUPPORTS.isAndroid) document.fullscreenElement ? document.exitFullscreen() : document.querySelector('.content-wrapper').requestFullscreen()
|
||||
}}
|
||||
|
||||
title={result.parseObject.file_name}>
|
||||
{#if media.bannerImage}
|
||||
<div class='position-absolute top-0 left-0 w-full h-full'>
|
||||
<img src={media.bannerImage} alt='bannerImage' class='img-cover w-full h-full' style='border-radius: 5px;' />
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
import { add } from '@/modules/torrent.js'
|
||||
import TorrentSkeletonCard from './TorrentSkeletonCard.svelte'
|
||||
import { onDestroy } from 'svelte'
|
||||
import { SUPPORTS } from '@/modules/support';
|
||||
|
||||
/** @type {{ media: Media, episode?: number }} */
|
||||
export let search
|
||||
|
|
@ -58,6 +59,7 @@
|
|||
countdown--
|
||||
if (countdown === 0) {
|
||||
play(best)
|
||||
if (SUPPORTS.isAndroid) document.fullscreenElement ? document.exitFullscreen() : document.querySelector('.content-wrapper').requestFullscreen()
|
||||
} else {
|
||||
timeoutHandle = setTimeout(decrement, 1000)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue