Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

页面跳转之后,视频还是在播放,有没有预留方法,暂停播放 #317

Closed
w3812127 opened this issue Jun 26, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@w3812127
Copy link

页面跳转之后,视频还是在播放,有没有预留方法,暂停播放
方便 在页面的 hide()生命周期中调用

@jin-yufeng
Copy link
Owner

什么平台啊?
可以试试这样吧

onHide() {
  for (let video of this.$refs.article._videos) {
    video.pause()
  }
}

@w3812127
Copy link
Author

uniapp android 平台,
for (let video of this.$refs.article._videos) {
video.pause()
}
这个方法 debug 的时候 _videso 是空的,没有拿到视频

@jin-yufeng
Copy link
Owner

是有这个问题,暂时没有找到好的解决办法

@jin-yufeng jin-yufeng added the wontfix This will not be worked on label Jul 14, 2021
@qingyun1029
Copy link

页面跳转之后,视频还是在播放,有没有预留方法,暂停播放 方便 在页面的 hide()生命周期中调用

可以利用 if 指令来控制(销毁) video

@jin-yufeng jin-yufeng added enhancement New feature or request and removed wontfix This will not be worked on labels Jan 22, 2022
@jin-yufeng jin-yufeng reopened this Jan 23, 2022
@jin-yufeng
Copy link
Owner

已增加 pauseMedia 方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants