@@ -116,6 +116,7 @@ function ShellVideo(options) {
116
116
break ;
117
117
}
118
118
case 'duration' : {
119
+ setBackground ( false ) ;
119
120
var intDuration = args . data | 0 ;
120
121
// Accumulate average duration over time. if it is greater than minClipDuration
121
122
// and equal to the currently reported duration, it is returned as video length.
@@ -325,8 +326,6 @@ function ShellVideo(options) {
325
326
stream = commandArgs . stream ;
326
327
onPropChanged ( 'stream' ) ;
327
328
328
- setBackground ( false ) ;
329
-
330
329
ipc . send ( 'mpv-set-prop' , [ 'no-sub-ass' ] ) ;
331
330
332
331
// opengl-cb is an alias for the new name "libmpv", as shown in mpv's video/out/vo.c aliases
@@ -352,7 +351,13 @@ function ShellVideo(options) {
352
351
}
353
352
ipc . send ( 'mpv-set-prop' , [ 'pause' , false ] ) ;
354
353
ipc . send ( 'mpv-set-prop' , [ 'speed' , props . speed ] ) ;
355
- ipc . send ( 'mpv-set-prop' , [ 'aid' , props . aid ] ) ;
354
+ if ( props . aid ) {
355
+ if ( typeof props . aid === 'string' && props . aid . startsWith ( 'EMBEDDED_' ) ) {
356
+ ipc . send ( 'mpv-set-prop' , [ 'aid' , props . aid . slice ( 'EMBEDDED_' . length ) ] ) ;
357
+ } else {
358
+ ipc . send ( 'mpv-set-prop' , [ 'aid' , props . aid ] ) ;
359
+ }
360
+ }
356
361
ipc . send ( 'mpv-set-prop' , [ 'mute' , 'no' ] ) ;
357
362
358
363
onPropChanged ( 'paused' ) ;
0 commit comments