Tone.js/test/helper/Supports.ts

29 lines
831 B
TypeScript
Raw Permalink Normal View History

// // import { UAParser } from "ua-parser-js";
2019-04-12 14:37:47 +00:00
// // const parsed = new UAParser().getBrowser();
2019-04-12 14:37:47 +00:00
// const name = "Chrome" as string;
2019-04-12 14:37:47 +00:00
// const version = 121;
2019-04-12 14:37:47 +00:00
// function is(browser, above?): boolean {
// return false;
// // above = above || 0;
// // return name.includes(browser) && version >= above;
// }
2019-04-12 14:37:47 +00:00
// function isnt(browser, below?): boolean {
// below = below || Infinity;
// return !(name.includes(browser) && version <= below);
// }
2019-04-12 14:37:47 +00:00
// function isntVersion(browser, browserVersion?): boolean {
// return name.includes(browser) && version !== browserVersion;
// }
2019-04-12 14:37:47 +00:00
// // if the tests run in focus
// // export const ONLINE_TESTING = isntVersion("Chrome", 71);
2019-04-12 14:37:47 +00:00
// // firefox does not invoke AudioBufferSourceNode.onended in the offline context
// // export const OFFLINE_BUFFERSOURCE_ONENDED = isnt("Firefox");