aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorevgeny <me@ch1p.com>2018-12-25 21:51:18 +0300
committerevgeny <me@ch1p.com>2018-12-25 21:51:18 +0300
commit2322dec6a4341b7ac6fcf60462e738533252a57f (patch)
tree4c296d7d5270c056d5d9602e634ad4e3feaad41d
parent4bb8b614a70fd8c483b7c5b8eaf7c4ed4634ff18 (diff)
version up
-rw-r--r--index.mm4
-rw-r--r--package.json2
2 files changed, 4 insertions, 2 deletions
diff --git a/index.mm b/index.mm
index 2e9db03..6599ff7 100644
--- a/index.mm
+++ b/index.mm
@@ -96,7 +96,9 @@ void AskForMediaAccess(const v8::FunctionCallbackInfo<Value>& args) {
Local<Function> cbFunc = Local<Function>::Cast(args[1]);
if (auto type = ParseMediaType(mediaType)) {
- if (@available(macOS 10.14, *)) {
+ NSOperatingSystemVersion minimumSupportedOSVersion = { .majorVersion = 10, .minorVersion = 14, .patchVersion = 0 };
+ BOOL isSupported = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:minimumSupportedOSVersion];
+ if (isSupported) {
Baton *baton = new Baton;
baton->type = type;
baton->callback.Reset(isolate, cbFunc);
diff --git a/package.json b/package.json
index 1a2b5fd..9cedefe 100644
--- a/package.json
+++ b/package.json
@@ -11,5 +11,5 @@
"install": "node-gyp rebuild",
"test": "node index.js"
},
- "version": "1.0.0"
+ "version": "1.0.1"
}