mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-19 23:52:06 +00:00
fix: setpositionstate error
This commit is contained in:
parent
61da6ae049
commit
1a0adfc472
3 changed files with 3 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "1.2.6",
|
||||
"version": "1.2.7",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"main": "src/index.js",
|
||||
"homepage": "https://github.com/ThaUnknown/miru#readme",
|
||||
|
|
|
|||
|
|
@ -552,7 +552,7 @@
|
|||
$: navigator.mediaSession?.setPositionState({
|
||||
duration: Math.max(0, duration || 0),
|
||||
playbackRate: 1,
|
||||
position: Math.min(duration || 0, currentTime || 0)
|
||||
position: Math.max(0, Math.min(duration || 0, currentTime || 0))
|
||||
})
|
||||
$: mediaChange(current)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,9 +60,7 @@ const codes = {
|
|||
511: 'Network Authentication Required'
|
||||
}
|
||||
|
||||
export const alID =
|
||||
!!alToken &&
|
||||
alRequest({ method: 'Viewer', token: alToken })
|
||||
export const alID = !!alToken && alRequest({ method: 'Viewer', token: alToken })
|
||||
|
||||
function printError (error) {
|
||||
console.warn(error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue