Skip to content

Commit

Permalink
Fix Setting Audio Track At Start
Browse files Browse the repository at this point in the history
  • Loading branch information
jaruba committed Dec 23, 2024
1 parent 7a104d9 commit b024c51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ShellVideo/ShellVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ function ShellVideo(options) {
}
ipc.send('mpv-set-prop', ['pause', false]);
ipc.send('mpv-set-prop', ['speed', props.speed]);
ipc.send('mpv-set-prop', ['aid', props.aid]);
if (props.aid) {
if (typeof props.aid === 'string' && props.aid.startsWith('EMBEDDED_'))
ipc.send('mpv-set-prop', ['aid', props.aid.slice('EMBEDDED_'.length)]);
else
ipc.send('mpv-set-prop', ['aid', props.aid]);
}
ipc.send('mpv-set-prop', ['mute', 'no']);

onPropChanged('paused');
Expand Down

0 comments on commit b024c51

Please sign in to comment.