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 stalls in macOS Safari #2436

Closed
5 tasks done
mrlika opened this issue Oct 31, 2019 · 2 comments · Fixed by #2453
Closed
5 tasks done

Video stalls in macOS Safari #2436

mrlika opened this issue Oct 31, 2019 · 2 comments · Fixed by #2453

Comments

@mrlika
Copy link
Contributor

mrlika commented Oct 31, 2019

Originally reported to P2P engine repository: Novage/p2p-media-loader#100

What version of Hls.js are you using?

0.12.4

What browser and OS are you using?

macOS in Safari only (no issue on other browsers/platforms)

Test stream:

https://dapian.video-yongjiu.com/20190901/9943_6699ca5d/index.m3u8

Checklist

  • The stream has correct Access-Control-Allow-Origin headers (CORS)
  • There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

Play the stream in an hls.js demo page in macOS Safari (it plays good in other browsers even on macOS).

Expected behavior

Video plays smoothly

Actual behavior

Stalls, doesn't play, lags at the very beginning

@mrlika
Copy link
Contributor Author

mrlika commented Nov 1, 2019

I noticed that the video plays once (with shaking at the very beginning) in Safari. Then it just hangs until you reopen Safari.

Also, the video plays without issues in Shaka Player in the same Safari.

@robwalch
Copy link
Collaborator

robwalch commented Nov 7, 2019

@mrlika The stream looks ok in feature/v1.0.0 https://deploy-preview-2370--hls-js-pr.netlify.com/demo/?src=https%3A%2F%2Fdapian.video-yongjiu.com%2F20190901%2F9943_6699ca5d%2Findex.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImR1bXBmTVA0IjpmYWxzZSwibGV2ZWxDYXBwaW5nIjotMSwibGltaXRNZXRyaWNzIjotMX0=

This appears to be a start-gap issue as content in Safari is buffered starting at 0.12s. There's a PR to address this in v0.13 #2359 but we're still going back and forth on the details.

@robwalch robwalch added this to the 0.13.0 milestone Nov 7, 2019
robwalch pushed a commit that referenced this issue Nov 21, 2019
robwalch pushed a commit that referenced this issue Nov 21, 2019
robwalch pushed a commit that referenced this issue Nov 27, 2019
robwalch pushed a commit that referenced this issue Dec 8, 2019
* upstream/master: (81 commits)
  Prevent seeking to 0 when startPosition is -1 Fixes #2438
  Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109
  Log license key size (DRM functional test troubleshooting)
  Improve functional test assertion feedback
  Handle stalls when seeking into buffer gaps
  Update gap controller to observe buffer gaps regardless of max buffer hole
  Update gap-controller comments
  Add seek back to start functional test
  Fix start gap jumping with partial fragments and when seeking back to start
  Reset stall time after seeked and fix logger statments
  Fix partial and large start gap jumping
  Do not jump gaps larger than JUMP_THRESHOLD_SECONDS
  Update gap-controller comments
  Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked"
  Jump start gap in Safari fixes #2436
  Update gap-controller to match v1 branch
  gap-controller: add handling for audio-only autoplay issues in Chrome
  gap-controller: improve some log lines
  gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases
  gap-controller: documentation/comments improvements
  ...

# Conflicts:
#	package-lock.json
#	scripts/travis.sh
#	src/controller/audio-stream-controller.js
#	src/controller/audio-track-controller.ts
#	src/controller/buffer-controller.ts
#	src/controller/gap-controller.js
#	src/controller/id3-track-controller.js
#	src/controller/stream-controller.js
#	src/controller/subtitle-stream-controller.ts
#	src/controller/subtitle-track-controller.ts
#	src/controller/timeline-controller.ts
#	src/demux/tsdemuxer.ts
#	src/events.js
#	src/loader/m3u8-parser.ts
#	src/utils/buffer-helper.ts
#	tests/functional/auto/setup.js
#	tests/test-streams.js
#	tests/unit/controller/ewma-bandwidth-estimator.js
#	tests/unit/controller/gap-controller.js
#	tests/unit/controller/subtitle-stream-controller.js
robwalch pushed a commit that referenced this issue Dec 9, 2019
* upstream/master: (81 commits)
  Prevent seeking to 0 when startPosition is -1 Fixes #2438
  Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109
  Log license key size (DRM functional test troubleshooting)
  Improve functional test assertion feedback
  Handle stalls when seeking into buffer gaps
  Update gap controller to observe buffer gaps regardless of max buffer hole
  Update gap-controller comments
  Add seek back to start functional test
  Fix start gap jumping with partial fragments and when seeking back to start
  Reset stall time after seeked and fix logger statments
  Fix partial and large start gap jumping
  Do not jump gaps larger than JUMP_THRESHOLD_SECONDS
  Update gap-controller comments
  Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked"
  Jump start gap in Safari fixes #2436
  Update gap-controller to match v1 branch
  gap-controller: add handling for audio-only autoplay issues in Chrome
  gap-controller: improve some log lines
  gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases
  gap-controller: documentation/comments improvements
  ...

# Conflicts:
#	package-lock.json
#	scripts/travis.sh
#	src/controller/audio-stream-controller.js
#	src/controller/audio-track-controller.ts
#	src/controller/buffer-controller.ts
#	src/controller/gap-controller.js
#	src/controller/id3-track-controller.js
#	src/controller/stream-controller.js
#	src/controller/subtitle-stream-controller.ts
#	src/controller/subtitle-track-controller.ts
#	src/controller/timeline-controller.ts
#	src/demux/tsdemuxer.ts
#	src/events.js
#	src/loader/m3u8-parser.ts
#	src/utils/buffer-helper.ts
#	tests/functional/auto/setup.js
#	tests/test-streams.js
#	tests/unit/controller/ewma-bandwidth-estimator.js
#	tests/unit/controller/gap-controller.js
#	tests/unit/controller/subtitle-stream-controller.js
robwalch pushed a commit that referenced this issue Dec 9, 2019
* upstream/master: (81 commits)
  Prevent seeking to 0 when startPosition is -1 Fixes #2438
  Prevent RangeError exception when parsing incomplete PES Fixes #2415 Relates to #2109
  Log license key size (DRM functional test troubleshooting)
  Improve functional test assertion feedback
  Handle stalls when seeking into buffer gaps
  Update gap controller to observe buffer gaps regardless of max buffer hole
  Update gap-controller comments
  Add seek back to start functional test
  Fix start gap jumping with partial fragments and when seeking back to start
  Reset stall time after seeked and fix logger statments
  Fix partial and large start gap jumping
  Do not jump gaps larger than JUMP_THRESHOLD_SECONDS
  Update gap-controller comments
  Avoid jumping gaps that Chrome will jump Prevent reporting stalls right after "seeked"
  Jump start gap in Safari fixes #2436
  Update gap-controller to match v1 branch
  gap-controller: add handling for audio-only autoplay issues in Chrome
  gap-controller: improve some log lines
  gap-controller: add unit tests for initial gap skipping + paused/hasPlayed cases
  gap-controller: documentation/comments improvements
  ...

# Conflicts:
#	package-lock.json
#	scripts/travis.sh
#	src/controller/audio-stream-controller.js
#	src/controller/audio-track-controller.ts
#	src/controller/buffer-controller.ts
#	src/controller/gap-controller.js
#	src/controller/id3-track-controller.js
#	src/controller/stream-controller.js
#	src/controller/subtitle-stream-controller.ts
#	src/controller/subtitle-track-controller.ts
#	src/controller/timeline-controller.ts
#	src/demux/tsdemuxer.ts
#	src/events.js
#	src/loader/m3u8-parser.ts
#	src/utils/buffer-helper.ts
#	tests/functional/auto/setup.js
#	tests/test-streams.js
#	tests/unit/controller/ewma-bandwidth-estimator.js
#	tests/unit/controller/gap-controller.js
#	tests/unit/controller/subtitle-stream-controller.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants