Table of Contents

Class TrackSoughtEventArgs

Namespace
Nyra.EventArgs
Assembly
Nyra.dll

Raised after the player seeked.

public sealed class TrackSoughtEventArgs : EventArgs
Inheritance
TrackSoughtEventArgs
Inherited Members

Remarks

NodeLink only.

Properties

Delta

How far the position moved, negative when seeking back.

[JsonIgnore]
public TimeSpan Delta { get; }

Property Value

TimeSpan

Remarks

Reads Zero when the value is outside the TimeSpan range, e.g. a stream marker the server echoed back.

DeltaMilliseconds

Signed distance the position moved by, in milliseconds, negative for a seek backwards.

[JsonPropertyName("duration")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt64Converter))]
public long? DeltaMilliseconds { get; }

Property Value

long?

Remarks

Carried on the wire as duration. Null when the frame carried none, it reads as no movement, a missing delta must not take the frame's valid position down with it, a value that is not a number at all drops the event whole.

GuildId

The guild the player plays in.

[JsonPropertyName("guildId")]
[JsonInclude]
[JsonConverter(typeof(TolerantSnowflakeConverter))]
public ulong GuildId { get; }

Property Value

ulong

Position

The position after the seek.

[JsonIgnore]
public TimeSpan Position { get; }

Property Value

TimeSpan

Remarks

Reads Zero when the value is outside the TimeSpan range, e.g. a stream marker the server echoed back.

PositionMilliseconds

Playback position after the seek, in milliseconds.

[JsonPropertyName("position")]
[JsonInclude]
[JsonConverter(typeof(RoundedInt64Converter))]
[JsonRequired]
public long PositionMilliseconds { get; }

Property Value

long

Remarks

A null on the wire is strict, the frame is dropped whole and surfaces as a NodeError rather than read as a seek to the start, and a frame without the member reads as 0, indistinguishable from a seek to the start.

A value outside the TimeSpan range (e.g. a stream marker the server echoed back) survives raw here, Position reads zero for it.