SpatialMediaPlayer


public final class SpatialMediaPlayer


Summary

Public constructors

Public methods

static final void
setPointSourceAttributes(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull PointSourceAttributes attributes
)

Sets a PointSourceAttributes 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-alpha01
public SpatialMediaPlayer()

Public methods

setPointSourceAttributes

Added in 1.0.0-alpha01
public static final void setPointSourceAttributes(
    @NonNull Session session,
    @NonNull MediaPlayer mediaPlayer,
    @NonNull PointSourceAttributes attributes
)

Sets a PointSourceAttributes on a MediaPlayer instance.

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

Parameters
@NonNull Session session

The current SceneCore Session instance.

@NonNull MediaPlayer mediaPlayer

The MediaPlayer instance on which to set the attributes

@NonNull PointSourceAttributes attributes

The source attributes to be set.

setSoundFieldAttributes

Added in 1.0.0-alpha01
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 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.