Skip to content

Commit

Permalink
fix(player): fix player state
Browse files Browse the repository at this point in the history
  • Loading branch information
mryanshenghong committed Jul 27, 2022
1 parent be915c1 commit 07b65d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Blog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ const formatTime = (time: string) => format(time);
// const toggleDrawer = (isDrawerShow: boolean) => (state.isDrawerShow = isDrawerShow);
const onMusicPlay = () => {
if (currentMediaRef) currentMediaRef.value.ele.pause();
if (currentMediaRef.value) currentMediaRef.value.ele.pause();
store.commit("setMediaRef", {
type: "music",
ele: musicPlayerRef,
});
};
const onVideoPlay = () => {
if (currentMediaRef) currentMediaRef.value.ele.pause();
if (currentMediaRef.value) currentMediaRef.value.ele.pause();
store.commit("setMediaRef", {
type: "video",
ele: videoPlayerRef,
Expand Down

0 comments on commit 07b65d3

Please sign in to comment.