File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
main/src/main/java/com/sedmelluq/discord/lavaplayer Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,16 @@ public void seekToTimecode(long timecode) {
156
156
}
157
157
}
158
158
159
+ /**
160
+ * Records a seek to the specified timecode without actually seeking.
161
+ *
162
+ * @param timecode The requested timecode in milliseconds
163
+ * @param actualTimecode The actual timecode in milliseconds
164
+ */
165
+ public void recordSeek (long timecode , long actualTimecode ) {
166
+ downstream .seekPerformed (timecode , actualTimecode );
167
+ }
168
+
159
169
/**
160
170
* @return True if the track is seekable (false for streams for example).
161
171
*/
Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ public void playStream(
35
35
36
36
try {
37
37
trackProvider .parseHeaders ();
38
+
39
+ // Persist the position to seek to
40
+ trackProvider .recordSeek (desiredPosition , startPosition );
41
+
38
42
trackProvider .provideFrames ();
39
43
} finally {
40
44
trackProvider .close ();
You can’t perform that action at this time.
0 commit comments