Skip to content

Commit

Permalink
Add android as an empty external in the web build
Browse files Browse the repository at this point in the history
+ add a guard in the watch page for dismissing notifications
  • Loading branch information
MarmadileManteater committed Feb 28, 2024
1 parent e617253 commit b004fe0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const config = {
},
externals: {
electron: '{}',
android: '{}',
'youtubei.js': '{}'
},
module: {
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,10 @@ export default defineComponent({
this.onMountedDependOnLocalStateLoading()
},
beforeDestroy() {
window.clearAllMediaSessionEventListeners()
android.cancelMediaNotification()
if (process.env.IS_ANDROID) {
window.clearAllMediaSessionEventListeners()
android.cancelMediaNotification()
}
},
methods: {
onMountedDependOnLocalStateLoading() {
Expand Down

0 comments on commit b004fe0

Please sign in to comment.