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

Fix undefined problems with browser defined objects #45

Closed
wants to merge 1 commit into from
Closed

Fix undefined problems with browser defined objects #45

wants to merge 1 commit into from

Conversation

radubrehar
Copy link

Also related to #44

The existing code is problematic in browsers that have AudioContext, MediaStream, requestAnimationFrame unprefixed.

Using

if (typeof AudioContext){
   ... 
   var AudioContext = ...

is wrong because of hoisting, so at the time of the if check, the variable is undefined.

@radubrehar
Copy link
Author

Thanks for merging the PR in! I'll close this.

@radubrehar radubrehar closed this Oct 12, 2015
@radubrehar radubrehar reopened this Oct 12, 2015
@radubrehar
Copy link
Author

Reopening since you have forgotten to also add https://github.com/muaz-khan/RecordRTC/pull/45/files#diff-6c74f5278517d57b7ec3f125cc5b0c6dR55

Because of this we get Cannot read property 'userAgent' of undefined because navigator is undefined

@radubrehar radubrehar mentioned this pull request Oct 22, 2015
@muaz-khan
Copy link
Owner

Maybe already merged.

@muaz-khan muaz-khan closed this Mar 3, 2017
AndersDJohnson pushed a commit to AndersDJohnson/RecordRTC that referenced this pull request Apr 8, 2019
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