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

Video playback constantly stops/pauses on iOS devices. #6330

Closed
Robbcode opened this issue Nov 23, 2019 · 22 comments · Fixed by #6373
Closed

Video playback constantly stops/pauses on iOS devices. #6330

Robbcode opened this issue Nov 23, 2019 · 22 comments · Fixed by #6373

Comments

@Robbcode
Copy link

Robbcode commented Nov 23, 2019

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

@welcome
Copy link

welcome bot commented Nov 23, 2019

👋 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.

@gkatsev
Copy link
Member

gkatsev commented Nov 26, 2019

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.

@woniuzfb
Copy link

woniuzfb commented Nov 27, 2019

+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"

@DispatchCommit
Copy link

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,
      // ...
    },
  },
});

@woniuzfb
Copy link

woniuzfb commented Dec 2, 2019

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

@aaronsoulliere
Copy link

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 }

@jb-alvarado
Copy link

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

@mrbatista
Copy link

mrbatista commented Dec 4, 2019

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

@samueleastdev
Copy link

samueleastdev commented Dec 16, 2019

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
Copy link

Can also confirm the issue is not present on 7.6.6.

@gkatsev
Copy link
Member

gkatsev commented Dec 17, 2019

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.

@hlibmykhailov
Copy link

hlibmykhailov commented Dec 18, 2019

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.

@jb-alvarado
Copy link

jb-alvarado commented Dec 18, 2019

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.

@supermoos
Copy link

Seeing the same issue on iPad Pro, iOS 13.2

@mister-ben
Copy link
Contributor

@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 c791cd8 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.

@jb-alvarado
Copy link

jb-alvarado commented Dec 19, 2019

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.

@gkatsev
Copy link
Member

gkatsev commented Dec 19, 2019

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

@gkatsev
Copy link
Member

gkatsev commented Dec 19, 2019

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
Copy link
Member

gkatsev commented Dec 20, 2019

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

@gkatsev
Copy link
Member

gkatsev commented Dec 24, 2019

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
Copy link
Member

gkatsev commented Dec 24, 2019

It's up as next on npm and I also published it on our CDN https://vjs.zencdn.net/7.7.4/video.js (or video.min.js)

@naanlizard
Copy link

naanlizard commented Jan 30, 2020

FWIW with 7.7.4 I'm still seeing this bug, regardless of overridenative setting, with an hls live stream with both the latest ios safari and desktop macos safari

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.