@stremio/stremio-video 0.0.72 → 0.0.73
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.
- package/package.json +1 -1
- package/src/ShellVideo/ShellVideo.js +11 -0
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ var stremioToMPVProps = {
|
|
|
12
12
|
'time': 'time-pos',
|
|
13
13
|
'duration': 'duration',
|
|
14
14
|
'buffering': 'buffering',
|
|
15
|
+
'buffered': 'demuxer-cache-time',
|
|
15
16
|
'volume': 'volume',
|
|
16
17
|
'muted': 'mute',
|
|
17
18
|
'playbackSpeed': 'speed',
|
|
@@ -73,6 +74,7 @@ function ShellVideo(options) {
|
|
|
73
74
|
|
|
74
75
|
ipc.send('mpv-observe-prop', 'paused-for-cache');
|
|
75
76
|
ipc.send('mpv-observe-prop', 'cache-buffering-state');
|
|
77
|
+
ipc.send('mpv-observe-prop', 'demuxer-cache-time');
|
|
76
78
|
|
|
77
79
|
ipc.send('mpv-observe-prop', 'aid');
|
|
78
80
|
ipc.send('mpv-observe-prop', 'vid');
|
|
@@ -177,6 +179,12 @@ function ShellVideo(options) {
|
|
|
177
179
|
}
|
|
178
180
|
break;
|
|
179
181
|
}
|
|
182
|
+
case 'demuxer-cache-time': {
|
|
183
|
+
var cacheTime = args.data || 0;
|
|
184
|
+
props[args.name] = cacheTime > 0 ? Math.floor(cacheTime * 1000) : null;
|
|
185
|
+
onPropChanged('buffered');
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
180
188
|
case 'aid':
|
|
181
189
|
case 'sid':
|
|
182
190
|
case 'vid': {
|
|
@@ -397,6 +405,7 @@ function ShellVideo(options) {
|
|
|
397
405
|
onPropChanged('time');
|
|
398
406
|
onPropChanged('duration');
|
|
399
407
|
onPropChanged('buffering');
|
|
408
|
+
onPropChanged('buffered');
|
|
400
409
|
onPropChanged('muted');
|
|
401
410
|
onPropChanged('subtitlesTracks');
|
|
402
411
|
onPropChanged('selectedSubtitlesTrackId');
|
|
@@ -418,6 +427,7 @@ function ShellVideo(options) {
|
|
|
418
427
|
subtitlesTracks: [],
|
|
419
428
|
audioTracks: [],
|
|
420
429
|
buffering: false,
|
|
430
|
+
buffered: null,
|
|
421
431
|
aid: null,
|
|
422
432
|
sid: null,
|
|
423
433
|
};
|
|
@@ -429,6 +439,7 @@ function ShellVideo(options) {
|
|
|
429
439
|
onPropChanged('time');
|
|
430
440
|
onPropChanged('duration');
|
|
431
441
|
onPropChanged('buffering');
|
|
442
|
+
onPropChanged('buffered');
|
|
432
443
|
onPropChanged('muted');
|
|
433
444
|
onPropChanged('subtitlesTracks');
|
|
434
445
|
onPropChanged('selectedSubtitlesTrackId');
|