Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature detect setTimeout in auto setup for SSR
In some server side rendering environments (e.g., `execjs` since version 2.8.0 [1]) `setTimeout` is not available. Since `autoSetupTimeout` runs when Video.js is imported and tries to schedule `autoSetup`, this can lead to errors of the following form in server side rendering: TypeError: scheduler is not a function `autoSetup` already bailed out if run outside of a browser environment or if globally disabled. To prevent calling `setTimeout`, we already perform the `Dom.isReal` check in `autoSetupTimeout`. Checking `options.autoSetup` has to remain in `autoSetup` to preserve backwards compatiblity with apps that set the option after Video.js has loaded but before the next tick. [1] rails/execjs#43
- Loading branch information