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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84425f844d397e7187168e44115168f310f5a48269da6b1f3efc424cbf9991aa
4
- data.tar.gz: 89e6d0d11fd1f88ec4e80498251f1d1d24cc4e77587860b7c96b0508306a3817
3
+ metadata.gz: 506387a27a8e92d1310a65f855110efff853b6079d9dbb65d6a3e1e56932cc18
4
+ data.tar.gz: 9d190b167472ba41881d547b527e501e446a75d844cefd4ff5b3200cd461cc94
5
5
  SHA512:
6
- metadata.gz: b48c2675d3ecedc52f6b2c7b70a728d927dd69a2564bfe16bc8b55101dfbf866e44b67957b1ad866c57819b0b66360aa637745a73c87238b0c769aa5b5b5e49a
7
- data.tar.gz: bbc58f41ea90eda2c8878cde5e6c182a364a5d8de5f4056ab5e6baad5178c67756cf2f02da5343a2b1a679d83839c02b0c1787de64ec6119a42c979abc9a9e2a
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`.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "repo": "tsirysndr/rocksky",
3
- "tag": "bindings-v0.6.0",
3
+ "tag": "bindings-v0.7.0",
4
4
  "checksums": {
5
- "aarch64-apple-darwin": "e2de89af96e1330427898524254ddb57728453947b607c4dd29fb8ed7c513b27",
6
- "aarch64-linux-gnu": "37b8f5ec3812cb15f7eeb75beb44ffe857cca95c11064d1e781eaff6edf7c14d",
7
- "x86_64-apple-darwin": "7a550b51fc75e1e4d7c5393423f2920dda980ea8f026c9bde8edd926d18d3795",
8
- "x86_64-linux-gnu": "683e9c14579041c77fa69b53f73b43a44432719c608d7af74f950c9263c5c53b",
9
- "x86_64-unknown-freebsd": "4ecf5a61000b46111aef2c66e241c97e712c8ef6af386a01afddfe2c05136893",
10
- "x86_64-unknown-netbsd": "0c619e60f6cf95c42bbe61adb26be8550024c8cbea08be6de9fb3127db627900"
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
  }
@@ -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 wire record shape.
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. Returns +self+ for chaining.
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rocksky
4
- VERSION = "0.9.1"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocksky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rocksky