@bililive-tools/bilibili-recorder 1.19.2 → 1.19.4

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.
Files changed (2) hide show
  1. package/lib/danma.js +5 -1
  2. package/package.json +8 -5
package/lib/danma.js CHANGED
@@ -137,9 +137,13 @@ class DanmaClient extends EventEmitter {
137
137
  this.emit("Message", gift);
138
138
  },
139
139
  onGift: (msg) => {
140
+ let timestamp = this.useServerTimestamp ? msg?.raw?.data?.timestamp * 1000 : Date.now();
141
+ if (msg.type === "SEND_GIFT_V2") {
142
+ timestamp = this.useServerTimestamp ? msg.timestamp : Date.now();
143
+ }
140
144
  const gift = {
141
145
  type: "give_gift",
142
- timestamp: this.useServerTimestamp ? msg?.raw?.data?.timestamp * 1000 : Date.now(),
146
+ timestamp: timestamp,
143
147
  name: msg.body.gift_name,
144
148
  count: msg.body.amount,
145
149
  price: msg.body.coin_type === "silver" ? 0 : msg.body.price / 1000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bililive-tools/bilibili-recorder",
3
- "version": "1.19.2",
3
+ "version": "1.19.4",
4
4
  "description": "bililive-tools bilibili recorder implemention",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
@@ -30,16 +30,19 @@
30
30
  "录制",
31
31
  "哔哩哔哩"
32
32
  ],
33
- "repository": "https://github.com/renmu123/biliLive-tools/tree/master/packages/BilibiliRecorder",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/renmu123/biliLive-tools",
36
+ "directory": "packages/BilibiliRecorder"
37
+ },
34
38
  "author": "renmu123",
35
39
  "license": "LGPL",
36
40
  "dependencies": {
37
- "blive-message-listener": "^0.5.5",
41
+ "blive-message-listener": "0.5.6-beta.1",
38
42
  "mitt": "^3.0.1",
39
- "tiny-bilibili-ws": "^1.0.2",
40
43
  "lodash-es": "^4.17.21",
41
44
  "axios": "^1.15.0",
42
- "@bililive-tools/manager": "^1.17.2"
45
+ "@bililive-tools/manager": "^1.17.3"
43
46
  },
44
47
  "scripts": {
45
48
  "build": "tsc",