updatePosition abstract method
- Float32List position
Update the position of the media player (audio source).
Available since: 3.6.0
Description: Update the position of the media player (audio source).
Use cases: The media player also needs to have 3D spatial sound.
When to call: It can be called after the engine by createEngine
has been initialized and the media player has been created by createMediaPlayer
.
Restrictions: This interface needs to be used in conjunction with the RangeAudio/RangeScene module. This interface can only be called successfully after the RangeAudio/RangeScene module enables 3D sound effects.
position
The unit vector of the front axis of its own coordinate system. The parameter is a float array with a length of 3.
Implementation
Future<void> updatePosition(Float32List position);