Skip to content

Commit

Permalink
Fix media-src CSP and progress bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tranxuanthang committed Oct 3, 2023
1 parent 0193ace commit 7c4bd90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
}
},
"security": {
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; media-src 'self' asset: https://asset.localhost; connect-src 'self' asset: *; style-src 'unsafe-inline' 'self'"
"csp": "default-src 'self'; img-src 'self' asset: https://asset.localhost; media-src *; connect-src 'self' asset: *; style-src 'unsafe-inline' 'self'"
},
"updater": {
"active": false
Expand Down
4 changes: 2 additions & 2 deletions src/composables/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const progress = ref(null)
const howlerSound = ref(null)

export function usePlayer() {
const setTrack = async (track, playOnLoad = true, progress = 0.0) => {
const setTrack = async (track, playOnLoad = true, setProgress = 0.0) => {
status.value = 'stopped'
const platformName = await platform()

Expand Down Expand Up @@ -46,7 +46,7 @@ export function usePlayer() {
})

howlerSound.value.on('play', () => {
howlerSound.value.seek(progress)
howlerSound.value.seek(setProgress)
status.value = 'playing'
window.requestAnimationFrame(updater)
})
Expand Down

0 comments on commit 7c4bd90

Please sign in to comment.