|
@@ -417,8 +417,12 @@ export class PlaybackManager implements IPlaybackParametersListener {
|
|
|
/** Sets the cursor and MusicSheet.SelectionStart to the target timestamp (fraction),
|
|
|
* but does not start playback if it was not started already.
|
|
|
* To get the timestamp from milliseconds, use getTimestampFromMs().
|
|
|
+ * To reset the playback start to the beginning of the sheet, call the function without arguments.
|
|
|
*/
|
|
|
- public setPlaybackStart(timestamp: Fraction): void {
|
|
|
+ public setPlaybackStart(timestamp?: Fraction): void {
|
|
|
+ if (!timestamp) {
|
|
|
+ timestamp = this.musicPartManager.MusicSheet.SourceMeasures[0].AbsoluteTimestamp; // start of sheet
|
|
|
+ }
|
|
|
this.musicPartManager.MusicSheet.SelectionStart = timestamp;
|
|
|
this.reset();
|
|
|
}
|