opal-web-midi 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/opal-web-midi.gemspec +1 -1
- data/opal/web_midi.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91981e093164b481a5917ee8bcb2d2e2b05e877c
|
4
|
+
data.tar.gz: f7a21e05f78d03eb70538a9d325890666a158a0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a749bad34950d6e7c2f7d56e901509e949d0b11651d29ca59351081eb7a39c77e2cda6403c35a05d9fddd60f1c2d64d4a895f011555eb274c3869170ef5612d1
|
7
|
+
data.tar.gz: 9a715526d57c76a7d84502ca9f8645c3e40fa9d16e1979fae9e023bca32af3d570390c8c4aa30d4b4eae5b2bdb7cfd1ed870990395ee2a93e712cf5668716214
|
data/opal-web-midi.gemspec
CHANGED
data/opal/web_midi.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
module WebMidi
|
2
2
|
Navigator = Native(`navigator`)
|
3
3
|
|
4
|
+
def self.support?
|
5
|
+
Native(`navigator.requestMIDIAccess !== undefined`)
|
6
|
+
end
|
7
|
+
|
4
8
|
def self.request_access(options = {}, &block)
|
9
|
+
raise "WebMIDI not supported" unless support?
|
10
|
+
|
5
11
|
success = lambda do |access|
|
6
12
|
block.call Access.new(access)
|
7
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-web-midi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Kalbarczyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|