DPlayer icon indicating copy to clipboard operation
DPlayer copied to clipboard

在播放器销毁后能禁止再发送.m3u8文件和ts文件请求吗?怎么做呢?(Can. M3u8 and TS file requests be banned after the player is destroyed? How to do it?)

Open bytangyue opened this issue 6 years ago • 5 comments

中文用户请注意:请尽量用英文描述你的 issue,这样能够让尽可能多的人帮到你。

If you want to report a bug, please provide the following information:

  • The steps to reproduce.
  • A minimal demo of the problem via https://jsfiddle.net or http://codepen.io/pen if possible.
  • Which versions of DPlayer, and which browser / OS are affected by this issue?

bytangyue avatar Nov 07 '19 09:11 bytangyue

在页面销毁之前调用player.destroy()

renwz avatar Dec 19 '19 11:12 renwz

这个貌似和新版浏览器工作模式有关,dplayer只是个播放器,如果你用了其他插件,例如flv.js之类的,需要找对应的解决办法,例如 https://github.com/bilibili/flv.js/pull/448/files#diff-2236408d6aad747aed1a901e3aac73feR120-R125

quickfight avatar Mar 15 '20 05:03 quickfight

先把hls.destory()再player

ekworp avatar Mar 19 '20 07:03 ekworp

请问这个您解决了吗?我在beforeDestroy中先调用hls的destory方法 然后调用了dplayer的destory方法,但在播放器后网络还在拉流

useryechen avatar Aug 24 '20 05:08 useryechen

在DOM销毁前调用hls.destroy()和dp.destroy()即可!亲测有效

S-hine avatar Nov 15 '21 13:11 S-hine