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

Expose dashjs.isSupported utility for checking MSE support #3497

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

chromakode
Copy link
Contributor

@chromakode chromakode commented Dec 29, 2020

Similar to #2055, I was looking for an easy way to test for MSE support before falling back to HLS. This small change exposes the existing supportsMediaSource check into a dashjs.isSupported() function on the global module object.

Example usage:

if (dashjs.isSupported()) {
  const player = dashjs.MediaPlayer().create()
  // ...
} else {
  // fallback logic
}

@dsilhavy dsilhavy self-requested a review January 6, 2021 06:28
@dsilhavy dsilhavy added this to the 3.2.1 milestone Jan 6, 2021
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
@chromakode
Copy link
Contributor Author

Added a commit addressing your comments -- thanks! Sorry I didn't catch the semicolons; I turned off my brain when lint passed 😅

@dsilhavy dsilhavy merged commit e1098fc into Dash-Industry-Forum:development Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants