fix: auto puase when leave pip
This commit is contained in:
@@ -6,6 +6,9 @@ class VideoManagerService {
|
|||||||
constructor() {
|
constructor() {
|
||||||
if (!VideoManagerService.instance) {
|
if (!VideoManagerService.instance) {
|
||||||
VideoManagerService.instance = this
|
VideoManagerService.instance = this
|
||||||
|
document.addEventListener('leavepictureinpicture', (e) => {
|
||||||
|
;(e.target as HTMLVideoElement).pause()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return VideoManagerService.instance
|
return VideoManagerService.instance
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user