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

ReferenceError: Can't find variable: SourceBuffer #2430

Closed
2 of 4 tasks
genie88 opened this issue Oct 30, 2019 · 2 comments · Fixed by #2490
Closed
2 of 4 tasks

ReferenceError: Can't find variable: SourceBuffer #2430

genie88 opened this issue Oct 30, 2019 · 2 comments · Fixed by #2490
Labels
Milestone

Comments

@genie88
Copy link

genie88 commented Oct 30, 2019

What version of Hls.js are you using?

latest

What browser and OS are you using?

MacOS Chrome 49

Test stream:

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

  1. Please provide clear steps to reproduce your problem
  2. If the bug is intermittent, give a rough frequency

Expected behavior

What you expected to happen
play video

Actual behavior

What actually happened
syntax error

Console output

Uncaught ReferenceError: SourceBuffer is not defined

const sourceBuffer = SourceBuffer || (window as any).WebKitSourceBuffer;

@robwalch
Copy link
Collaborator

robwalch commented Dec 6, 2019

This has been addressed. See is-supported.js in v0.12.4

https://github.com/video-dev/hls.js/blob/v0.12.4/src/is-supported.js#L5

If you find issues with v0.13.0(-beta.2) in Chrome 49 please reopen with steps to reproduce.

@robwalch robwalch closed this as completed Dec 6, 2019
@EhsanCh
Copy link

EhsanCh commented Jan 1, 2020

I can reproduce it in Chrome Portable Version 48.0.2564.82


Hls.isSupported();
hls.min.js:1 Uncaught ReferenceError: SourceBuffer is not defined(…)(anonymous function) @ Hls.min.js:1i.isSupported @ hls.min.js:1(anonymous function)  
Hls.version
"0.13.0"

@robwalch robwalch reopened this Jan 3, 2020
@robwalch robwalch added the Bug label Jan 3, 2020
@robwalch robwalch added this to the 0.13.1 milestone Jan 3, 2020
@robwalch robwalch changed the title Does not work properly in Chrome 49 ReferenceError: Can't find variable: SourceBuffer Jan 3, 2020
robwalch pushed a commit that referenced this issue Jan 8, 2020
* upstream/master: (92 commits)
  Update package-lock
  Update TypeScript and run `npm audit fix`
  Add a lint rule to disallow use of SourceBuffer global
  Fix `isSupported` check in browser missing `SourceBuffer` global Fixes #2430 #2476
  https
  add code of conduct
  Remove build:types from release job.
  Remove TypeScript types build step
  only include js files in release
  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
  ...

# Conflicts:
#	package-lock.json
#	package.json
#	scripts/travis.sh
#	src/controller/audio-stream-controller.js
#	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 to jwplayer/hls.js that referenced this issue Jan 8, 2020
* feature/v1.0.0: (95 commits)
  Enforce no-case-declarations
  Cleanup timeout calls
  Enforce 'no-unused-vars' lint rule
  Update package-lock
  Update TypeScript and run `npm audit fix`
  Add a lint rule to disallow use of SourceBuffer global
  Fix `isSupported` check in browser missing `SourceBuffer` global Fixes video-dev#2430 video-dev#2476
  https
  add code of conduct
  Remove build:types from release job.
  Remove TypeScript types build step
  only include js files in release
  Prevent seeking to 0 when startPosition is -1 Fixes video-dev#2438
  Prevent RangeError exception when parsing incomplete PES Fixes video-dev#2415 Relates to video-dev#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
  ...
robwalch pushed a commit to jwplayer/hls.js that referenced this issue Jan 9, 2020
* feature/v1.0.0: (96 commits)
  Fix audio gaps introduced by changes in remuxer continuity tracking
  Enforce no-case-declarations
  Cleanup timeout calls
  Enforce 'no-unused-vars' lint rule
  Update package-lock
  Update TypeScript and run `npm audit fix`
  Add a lint rule to disallow use of SourceBuffer global
  Fix `isSupported` check in browser missing `SourceBuffer` global Fixes video-dev#2430 video-dev#2476
  https
  add code of conduct
  Remove build:types from release job.
  Remove TypeScript types build step
  only include js files in release
  Prevent seeking to 0 when startPosition is -1 Fixes video-dev#2438
  Prevent RangeError exception when parsing incomplete PES Fixes video-dev#2415 Relates to video-dev#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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants