Skip to content

Commit

Permalink
Merge pull request #62 from nini22P/dev
Browse files Browse the repository at this point in the history
fix: playing other files while paused accidentally plays the current file
  • Loading branch information
nini22P authored Dec 14, 2023
2 parents 9aa5eda + f10afe9 commit 19b590b
Show file tree
Hide file tree
Showing 11 changed files with 617 additions and 512 deletions.
15 changes: 15 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript"
},
"baseUrl": "./",
"paths": {
"@/*": [
"src/*"
]
}
},
"minify": false
}
246 changes: 123 additions & 123 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "omp",
"description": "OneDrive Media Player",
"private": true,
"version": "1.3.0",
"version": "1.3.1",
"scripts": {
"dev": "webpack serve",
"build": "webpack --mode=production --node-env=production",
Expand All @@ -15,11 +15,11 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.8",
"@mui/icons-material": "^5.14.19",
"@mui/material": "^5.14.19",
"@mui/icons-material": "^5.15.0",
"@mui/material": "^5.15.0",
"buffer": "^6.0.3",
"extract-colors": "^4.0.2",
"i18next": "^23.7.7",
"i18next": "^23.7.9",
"i18next-browser-languagedetector": "^7.2.0",
"idb-keyval": "^6.2.1",
"music-metadata-browser": "^2.5.10",
Expand All @@ -34,25 +34,25 @@
"devDependencies": {
"@swc/core": "^1.3.100",
"@types/extract-colors": "^1.1.4",
"@types/node": "^20.10.2",
"@types/react": "^18.2.40",
"@types/node": "^20.10.4",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"autoprefixer": "^10.4.16",
"compression-webpack-plugin": "^10.0.0",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"dotenv-webpack": "^8.0.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"html-webpack-plugin": "^5.5.3",
"eslint-plugin-react-refresh": "^0.4.5",
"html-webpack-plugin": "^5.5.4",
"postcss": "^8.4.32",
"postcss-loader": "^7.3.3",
"style-loader": "^3.3.3",
"swc-loader": "^0.2.3",
"typescript": "^5.3.2",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
Expand Down
6 changes: 4 additions & 2 deletions src/hooks/useControlHide.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect } from 'react'
import useUiStore from '../store/useUiStore'

export const useControlHide = (type: string, videoViewIsShow: boolean) => {
const useControlHide = (type: string, videoViewIsShow: boolean) => {
const updateControlIsShow = useUiStore((state) => state.updateControlIsShow)
useEffect(
() => {
Expand All @@ -27,4 +27,6 @@ export const useControlHide = (type: string, videoViewIsShow: boolean) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
[type, videoViewIsShow]
)
}
}

export default useControlHide
6 changes: 4 additions & 2 deletions src/hooks/useMediaSession.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect } from 'react'

export const useMediaSession = (
const useMediaSession = (
player: HTMLVideoElement | null,
cover: string,
album: string | undefined,
Expand Down Expand Up @@ -70,4 +70,6 @@ export const useMediaSession = (
},
[cover, album, artist, title, handleClickPlay, handleClickPause, handleClickNext, handleClickPrev, handleClickSeekbackward, handleClickSeekforward, SeekTo]
)
}
}

export default useMediaSession
Loading

0 comments on commit 19b590b

Please sign in to comment.