SpatialMediaPlayer


public final class SpatialMediaPlayer


Summary

Public constructors

Public methods

static final void
setPointSourceParams(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull PointSourceParams params
)

Sets a PointSourceParams on a MediaPlayer instance.

static final void
setSoundFieldAttributes(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull SoundFieldAttributes attributes
)

Sets a SoundFieldAttributes on a MediaPlayer instance.

Public constructors

SpatialMediaPlayer

Added in 1.0.0-alpha04
public SpatialMediaPlayer()

Public methods

setPointSourceParams

Added in 1.0.0-alpha04
public static final void setPointSourceParams(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull PointSourceParams params
)

Sets a PointSourceParams on a MediaPlayer instance.

Must be called before prepare(), not compatible with instances created by MediaPlayer#create(). Only the params or attributes from the most recent call to setPointSourceParams or setSoundFieldAttributes will apply.

Parameters
@NonNull Session session

The current SceneCore Session instance.

@NonNull MediaPlayer mediaPlayer

The MediaPlayer instance on which to set the params

@NonNull PointSourceParams params

The source params to be set.

setSoundFieldAttributes

Added in 1.0.0-alpha04
public static final void setSoundFieldAttributes(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull SoundFieldAttributes attributes
)

Sets a SoundFieldAttributes on a MediaPlayer instance.

Must be called before prepare(), not compatible with instances created by MediaPlayer#create(). Only the attributes or params from the most recent call to setSoundFieldAttributes or setPointSourceAttributes will apply.

Parameters
@NonNull Session session

The current SceneCore Session instance.

@NonNull MediaPlayer mediaPlayer

The MediaPlayer instance on which to set the attributes

@NonNull SoundFieldAttributes attributes

The source attributes to be set.