NEW 170993
m3u8 still download and play when page switch
https://bugs.webkit.org/show_bug.cgi?id=170993
Summary m3u8 still download and play when page switch
johann
Reported 2017-04-19 07:39:00 PDT
Created attachment 307479 [details] you can hear the voice when you switch page in safari, open a page contain video element which src is m3u8. Then switch page in the same tab (change url or go ahead/back by history) the page will be put in the background and the video is still playing. you can catch the package by fidler or charles. if we switch to another tab, we can get the visibiltychange events, and pause the video by code however, if we just switch the page in the same tab, we can do nothing. Because beforeunload, popstate, pushstate and hashchange events would not be trigger at all. you can see this on twitter https://twitter.com/lovevfp/status/854671913163005953
Attachments
you can hear the voice when you switch page (1.49 MB, video/mp4)
2017-04-19 07:39 PDT, johann
no flags
Radar WebKit Bug Importer
Comment 1 2017-04-19 09:22:50 PDT
johann
Comment 2 2017-04-19 19:53:17 PDT
to offer more info my os version 10.3.1(14E304) the video can play in the background with voice http://h.open.huajiao.com/l/index?liveid=98157279 the video can play in background silent but keep download package http://h.open.huajiao.com/l/index?liveid=104524475 i am not sure whether you can open that in U.S.A. if you need other address, you can contact me.
johann
Comment 3 2017-05-07 22:15:26 PDT
i temporarily fix this by using pagehide event function stopVideo (evt) { if (evt.persisted) { $('video').each(function () { this.src = ''; }); } } window.addEventListener("pagehide", stopVideo, false);
Note You need to log in before you can comment on or make changes to this bug.