We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bc3b1a commit d255e5eCopy full SHA for d255e5e
1 file changed
js/player.js
@@ -62,7 +62,8 @@ const audioPlayer = immediate(() => {
62
return {
63
play(src, rate, volume) {
64
if (current) current.playback.unsubscribe()
65
- const url = (src instanceof Blob) ? URL.createObjectURL(src) : src
+ const isBlob = src instanceof Blob
66
+ const url = isBlob ? URL.createObjectURL(src) : src
67
const playbackState$ = new rxjs.BehaviorSubject("resumed")
68
return new Promise((fulfill, reject) => {
69
current = {
@@ -72,6 +73,7 @@ const audioPlayer = immediate(() => {
72
73
error: reject
74
})
75
}
76
+ if (isBlob) current.playback.add(() => URL.revokeObjectURL(url))
77
78
},
79
pause() {
0 commit comments