diff options
author | evgeny <me@ch1p.com> | 2018-12-25 21:51:18 +0300 |
---|---|---|
committer | evgeny <me@ch1p.com> | 2018-12-25 21:51:18 +0300 |
commit | 2322dec6a4341b7ac6fcf60462e738533252a57f (patch) | |
tree | 4c296d7d5270c056d5d9602e634ad4e3feaad41d /index.mm | |
parent | 4bb8b614a70fd8c483b7c5b8eaf7c4ed4634ff18 (diff) |
version up
Diffstat (limited to 'index.mm')
-rw-r--r-- | index.mm | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |