Skip to content

Commit

Permalink
Fix loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
core1024 committed Oct 24, 2024
1 parent a0e96da commit 5314618
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ShellVideo/ShellVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var ERROR = require('../error');
var SUBS_SCALE_FACTOR = 0.0066;

var stremioToMPVProps = {
'loaded': null,
'stream': null,
'paused': 'pause',
'time': 'time-pos',
Expand Down Expand Up @@ -110,7 +111,7 @@ function ShellVideo(options) {
// for bitwise maths so the maximum supported video duration is 1073741823 (2 ^ 30 - 1)
// which is around 34 years of playback time.
avgDuration = avgDuration ? (avgDuration + intDuration) >> 1 : intDuration;
events.emit('propChanged', 'loaded', 'true');
if(intDuration > 0) events.emit('propChanged', 'loaded', 'true');
break;
}
case 'time-pos': {
Expand Down Expand Up @@ -350,6 +351,7 @@ function ShellVideo(options) {
}
case 'unload': {
props = {
loaded: false,
pause: false,
mute: false,
speed: 1,
Expand Down

0 comments on commit 5314618

Please sign in to comment.