Partager via


TvInputService.Session.OnTimeShiftGetCurrentPosition Method

Definition

Returns the current position for time shifting, in milliseconds since the epoch.

[Android.Runtime.Register("onTimeShiftGetCurrentPosition", "()J", "GetOnTimeShiftGetCurrentPositionHandler", ApiSince=23)]
public virtual long OnTimeShiftGetCurrentPosition ();
[<Android.Runtime.Register("onTimeShiftGetCurrentPosition", "()J", "GetOnTimeShiftGetCurrentPositionHandler", ApiSince=23)>]
abstract member OnTimeShiftGetCurrentPosition : unit -> int64
override this.OnTimeShiftGetCurrentPosition : unit -> int64

Returns

Attributes

Remarks

Returns the current position for time shifting, in milliseconds since the epoch. Returns TvInputManager#TIME_SHIFT_INVALID_TIME if the position is unknown at the moment.

The current position for time shifting is the same as the current position of playback. It should be equal to or greater than the start position reported by #onTimeShiftGetStartPosition(). When playback is completed, the current position should stay where the playback ends, in other words, the returned value of this mehtod should be equal to the start position plus the duration of the program.

Java documentation for android.media.tv.TvInputService.Session.onTimeShiftGetCurrentPosition().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to