Skip to content

Commit f88a430

Browse files
author
Jun Tian
committed
Add audio delay setting through cli
Signed-off-by: Jun Tian <jun.tian@fb.com>
1 parent 1af0b0a commit f88a430

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/is/xyz/mpv/MPVActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,11 @@ class MPVActivity : AppCompatActivity(), MPVLib.EventObserver, TouchGesturesObse
977977
val pos = extras.getInt("position", 0) / 1000f
978978
onloadCommands.add(arrayOf("set", "start", pos.toString()))
979979
}
980+
//audio delay is in ms
981+
if (extras.getInt("audio_delay", 0) > 0) {
982+
val delay = extras.getInt("audio_delay", 0) / 1000f
983+
onloadCommands.add(arrayOf("set", "audio-delay", delay.toString()))
984+
}
980985
}
981986

982987
// UI (Part 2)

0 commit comments

Comments
 (0)