rocksky 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/rocksky/manifest.json +7 -7
- data/lib/rocksky/remote.rb +9 -3
- data/lib/rocksky/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 506387a27a8e92d1310a65f855110efff853b6079d9dbb65d6a3e1e56932cc18
|
|
4
|
+
data.tar.gz: 9d190b167472ba41881d547b527e501e446a75d844cefd4ff5b3200cd461cc94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a82ef8bb90f40689b29067ba2debfe55eb8e099ed0897c3a69b795a3f03e76c49b10ba42d2035377027ea6701b53ac7be2195b2aead08f0a609ebd4e3058e9c
|
|
7
|
+
data.tar.gz: 78ca04c14127de3ae2b6993a942129ad1d9118679f1c8458807d315744e703932ae3c861fb32349fb615dff4d4086207bc38e19a2361d27a8fa047291576addf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0
|
|
4
|
+
|
|
5
|
+
- Remote-player protocol: now-playing records accept optional audio info —
|
|
6
|
+
`codec` (audio codec/container, e.g. "mp3", "flac") and `sampleRate` (sample
|
|
7
|
+
rate in Hz, e.g. 44100). A player includes them in the `track` payload when
|
|
8
|
+
set (`codec` / `sample_rate` on the wire, omitted otherwise); a controller's
|
|
9
|
+
`:now_playing` event exposes them on the `:track` hash.
|
|
10
|
+
|
|
3
11
|
## 0.9.1
|
|
4
12
|
|
|
5
13
|
- Fix a segfault when tearing down a `RemotePlayer` / `RemoteController`.
|
data/lib/rocksky/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"repo": "tsirysndr/rocksky",
|
|
3
|
-
"tag": "bindings-v0.
|
|
3
|
+
"tag": "bindings-v0.7.0",
|
|
4
4
|
"checksums": {
|
|
5
|
-
"aarch64-apple-darwin": "
|
|
6
|
-
"aarch64-linux-gnu": "
|
|
7
|
-
"x86_64-apple-darwin": "
|
|
8
|
-
"x86_64-linux-gnu": "
|
|
9
|
-
"x86_64-unknown-freebsd": "
|
|
10
|
-
"x86_64-unknown-netbsd": "
|
|
5
|
+
"aarch64-apple-darwin": "e9a772586564269dccf8448d46162b85fe5290307b818b3a4fc26ff634c2ab57",
|
|
6
|
+
"aarch64-linux-gnu": "fbfc5d12a8c532f437577f1c2e36c794760e78bb66749af33eef17d14a60cafc",
|
|
7
|
+
"x86_64-apple-darwin": "81e5628ea2f269ac8efefce85fa5eae093b1d49848aba580da9f267a36f85115",
|
|
8
|
+
"x86_64-linux-gnu": "3d3de1e3b691416676dd1c09879b14944a5c85d1d8911650113e6ee7783326e2",
|
|
9
|
+
"x86_64-unknown-freebsd": "b0ad8071e2a6baf1096d4f82221c440e56bf9426e435244ade8687f08edabf69",
|
|
10
|
+
"x86_64-unknown-netbsd": "08e9ff48d6273e63d6ebdc5eb3882777bc9bd227bc9126478a98c5041e2f1f05"
|
|
11
11
|
}
|
|
12
12
|
}
|
data/lib/rocksky/remote.rb
CHANGED
|
@@ -27,7 +27,8 @@ module Rocksky
|
|
|
27
27
|
#
|
|
28
28
|
# Records (now-playing / queue items) are passed as Hashes with camelCase keys
|
|
29
29
|
# (title, artist, album, albumArtist, albumArt, durationMs, elapsedMs,
|
|
30
|
-
# isPlaying / songUri, albumUri, trackNumber), matching the
|
|
30
|
+
# isPlaying, codec, sampleRate / songUri, albumUri, trackNumber), matching the
|
|
31
|
+
# wire record shape.
|
|
31
32
|
class RemotePlayer
|
|
32
33
|
# Connect and register a controllable player in the background. +token+ is a
|
|
33
34
|
# Rocksky access token (JWT); +name+ is the device-picker label; +url+
|
|
@@ -79,7 +80,10 @@ module Rocksky
|
|
|
79
80
|
|
|
80
81
|
# Advertise the currently-playing track. Call whenever it changes, and
|
|
81
82
|
# periodically (~every 1–4s) with a fresh +elapsedMs+ so controllers show
|
|
82
|
-
# smooth progress. +track+ is a camelCase Hash.
|
|
83
|
+
# smooth progress. +track+ is a camelCase Hash. Optional audio info —
|
|
84
|
+
# +codec+ (audio codec/container, e.g. "mp3", "flac") and +sampleRate+
|
|
85
|
+
# (sample rate in Hz, e.g. 44100) — is included in the track payload when
|
|
86
|
+
# set, and omitted otherwise.
|
|
83
87
|
def set_now_playing(track)
|
|
84
88
|
Rocksky.unwrap(C.rocksky_remote_player_set_now_playing(@ptr, JSON.generate(track)))
|
|
85
89
|
end
|
|
@@ -164,7 +168,9 @@ module Rocksky
|
|
|
164
168
|
# Register a handler for a server event type, one of +:devices+,
|
|
165
169
|
# +:device_registered+, +:device_unregistered+, +:primary_changed+,
|
|
166
170
|
# +:now_playing+, +:status+, +:queue+. The block receives the full
|
|
167
|
-
# symbol-keyed event Hash.
|
|
171
|
+
# symbol-keyed event Hash. A +:now_playing+ event carries the advertised
|
|
172
|
+
# track under +:track+, including optional +:codec+ / +:sampleRate+ audio
|
|
173
|
+
# info when the player supplied it. Returns +self+ for chaining.
|
|
168
174
|
def on(event_type, &block)
|
|
169
175
|
@handlers[event_type.to_sym] = block
|
|
170
176
|
self
|
data/lib/rocksky/version.rb
CHANGED