FramePlayer Class¶
Description¶
MonoBehaviour which controls InputFramePlayer and VideoInputFramePlayer in the scene, providing a few extensions in the Unity environment.
It will be used when AssembleOptions.FrameSource is AssembleOptions.FrameSourceSelection.FramePlayer or when ‘Frame Player’ is selected in the ‘Session Validation Tool’ from DiagnosticsController inspector (editor only).
Fields¶
FilePathType¶
- C#
public WritablePathType FilePathType
File path type. Set before FramePlayer.Play .
FilePath¶
- C#
public string FilePath
File path. Set before FramePlayer.Play .
Properties¶
enabled¶
- C#
public bool enabled { get; set; }
Play/Pause eif file playback when ARSession is running. Playback will start only when MonoBehaviour .enabled is true after session started.
IsStarted¶
- C#
public bool IsStarted { get; }
Whether the playback is started.
IsCompleted¶
- C#
public bool IsCompleted { get; }
Whether the playback is completed.
Length¶
- C#
public Optional<double> Length { get; }
Total expected playback time. The unit is second.
Time¶
- C#
public double Time { get; }
Current time played.
IsSeekable¶
- C#
public bool IsSeekable { get; }
Whether the current playback time point can be relocated. If recording halts improperly, index data to set playback time point may be missing.
IsSpeedChangeable¶
- C#
public bool IsSpeedChangeable { get; }
Whether the playback speed can be changed.
Speed¶
- C#
public double Speed { get; set; }
Current playback speed.
CameraCandidate¶
- C#
public Camera CameraCandidate { get; set; }
FramePlayer.Camera candidate. Only effective if Unity XR Origin is not used. Camera.main will be used if not specified.
Methods¶
Play¶
- C#
public bool Play()
Start eif file playback. If neither FramePlayer.Play nor FramePlayer.Stop is called manually, FramePlayer.Play will be automatically invoked upon ARSession startup.
Can only be used after session start.
Stop¶
- C#
public void Stop()
Stop eif file playback.
Seek¶
- C#
public bool Seek(double time)
Sets current playback time point. The unit is second. If index data is missing, it returns false.