video.js icon indicating copy to clipboard operation
video.js copied to clipboard

Video playback constantly stops/pauses on iOS devices.

Open Robbcode opened this issue 7 years ago • 22 comments

Description

Video playback of MP4 x264/aac file will stop/pause playback shortly after started, if manually unpaused playback will stop again shortly afterwards.

Stop/Pause can happen as quickly as 14 seconds in to playback.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Load page on iOS with videojs and mp4 x264/aac video.
  2. Press to start playback on iOS device.

Results

Expected

Video playback of MP4 file should be uninterrupted.

Actual

Video playback of MP4 stops/pauses repeatedly.

Error output

Browser console shows no errors.

Additional Information

I have reproduced the problem on Firefox desktop v70 and setting user agent string to iOS.

what version of videojs does this occur with?

videojs v7.7.0 - v7.7.1

The problem does not seem to happen on version before theses.

browsers / OSes

iPhone/iPad. iPhone; CPU iPhone OS 12_4_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1

Firefox desktop v70.0 with user agent changed to same as above seem to reproduce the problem as well.

plugins

No plugins

Robbcode avatar Nov 23 '19 16:11 Robbcode

👋 Thanks for opening your first issue here! 👋

If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.

welcome[bot] avatar Nov 23 '19 16:11 welcome[bot]

Do you have the file that you're having issues with? Locally, I do not have any issues with mp4 files with h264 and aac codecs in them. It's likely that you need to re-transcode your file.

gkatsev avatar Nov 26 '19 20:11 gkatsev

+1 same issue here using it for HLS no such issue before

"Mozilla/5.0 (iPhone; CPU iPhone OS 13_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/78.0.3904.84 Mobile/15E148 Safari/604.1"

woniuzfb avatar Nov 27 '19 11:11 woniuzfb

What tech are you using for your player? Are you overriding the native player for any (all?) browsers? Does changing the overrideNative value fix the issue?

// Create video.js player
this.player = videojs('streamplayer', {
  // ...
  html5: {
    hls: {
      overrideNative: !videojs.browser.IS_SAFARI,
      // ...
    },
  },
});

DispatchCommit avatar Dec 02 '19 09:12 DispatchCommit

Are you overriding the native player for any (all?) browsers? Does changing the overrideNative value fix the issue?

overrideNative: true No.It didn't fix the issue. Chrome/Safari/all browsers on ios happens

woniuzfb avatar Dec 02 '19 11:12 woniuzfb

reverting to 7.6.6 resolved this issue for now.

with 7.7.1, overrideNative didn't help 'nativeAudioTracks': false, 'nativeVideoTracks': false, 'hls': { 'overrideNative': true }

aaronsoulliere avatar Dec 02 '19 20:12 aaronsoulliere

Same problem here with hls live stream, 7.6.6 works, but not 7.7.1 except Firefox.

jb-alvarado avatar Dec 03 '19 20:12 jb-alvarado

Same problem with video.js 7.7.1 and hls stream on iOS. Confirm that works correctly with version 7.6.6.

mrbatista avatar Dec 04 '19 17:12 mrbatista

Same problem constantly pausing on IOS, ill set up a demo. I'm not getting any errors in the console Safari developer debug when connecting my phone via usb.

samueleastdev avatar Dec 16 '19 12:12 samueleastdev

Can also confirm the issue is not present on 7.6.6.

samueleastdev avatar Dec 16 '19 12:12 samueleastdev

A demo would be great. Is there a specific iOS version and device combination that this happens on? I've not been able to reproduce locally. If someone who has it reliably able to go through the commits via git bisect (https://github.com/videojs/video.js/compare/v7.6.6...v7.7.1) that would be highly appreciated.

gkatsev avatar Dec 17 '19 17:12 gkatsev

A demo would be great. Is there a specific iOS version and device combination that this happens on? I've not been able to reproduce locally. If someone who has it reliably able to go through the commits via git bisect (v7.6.6...v7.7.1) that would be highly appreciated.

Have same problems on any iOS device only on versions above 7.6.6 On 7.6.6 works well.

hlibmykhailov avatar Dec 18 '19 07:12 hlibmykhailov

Here is a demo: https://srs2.ad-europa.org/demo/ Tested devices are iPhone 5, iPhone 8 and iPhone 10 (X).

When you go a bit back in time, it works better.

jb-alvarado avatar Dec 18 '19 08:12 jb-alvarado

Seeing the same issue on iPad Pro, iOS 13.2

supermoos avatar Dec 18 '19 10:12 supermoos

@jb-alvarado thank you for the reproducible example. It's vastly more useful than all the "same issue" comments.

Safari seems confused about the DVR window with this video. It starts showing about -26:40:45 but changes to -59:43 after it freezes. There may be an issue with the stream itself but it's likely that c791cd8c4ea7675688882d39d745096f817e1395 is the cause of the pause in reaction to that.

Your video is live HLS. No idea if that's representative of all the reports here. The first description mentions MP4 so not necessarily the same problem. Don't know if the others were live, some mention HLS.

mister-ben avatar Dec 18 '19 12:12 mister-ben

I have here now also a demo with an mp4 file: https://srs2.ad-europa.org/demo/mp4.html By me it stops to, after two minutes.

jb-alvarado avatar Dec 19 '19 08:12 jb-alvarado

While we investigate, I've set latest on npm to 7.6.6.

gkatsev avatar Dec 19 '19 18:12 gkatsev

Oh, I guess it's still latest. We'll make sure that this is resolved before a 7.7 release branch is promoted to latest.

gkatsev avatar Dec 19 '19 19:12 gkatsev

By the way, I've reproduced this and I'm looking into it. Not exactly sure why I couldn't reproduce before.

gkatsev avatar Dec 20 '19 17:12 gkatsev

I'm releasing Video.js 7.7.4 which reverts the previous change. If you haven't downgraded yet, consider trying this version out.

gkatsev avatar Dec 24 '19 16:12 gkatsev