Sdílet prostřednictvím


MediaSyncEvent.SetAudioSessionId(Int32) Method

Definition

Sets the event source audio session ID.

[Android.Runtime.Register("setAudioSessionId", "(I)Landroid/media/MediaSyncEvent;", "GetSetAudioSessionId_IHandler")]
public virtual Android.Media.MediaSyncEvent? SetAudioSessionId (int audioSessionId);
[<Android.Runtime.Register("setAudioSessionId", "(I)Landroid/media/MediaSyncEvent;", "GetSetAudioSessionId_IHandler")>]
abstract member SetAudioSessionId : int -> Android.Media.MediaSyncEvent
override this.SetAudioSessionId : int -> Android.Media.MediaSyncEvent

Parameters

audioSessionId
Int32

the audio session ID of the event source being monitored.

Returns

the MediaSyncEvent the method is called on.

Attributes

Exceptions

Remarks

Sets the event source audio session ID.

The audio session ID specifies on which audio session the synchronization event should be monitored. It is mandatory for certain event types (e.g. #SYNC_EVENT_PRESENTATION_COMPLETE). For instance, the audio session ID can be retrieved via MediaPlayer#getAudioSessionId() when monitoring an event on a particular MediaPlayer.

Java documentation for android.media.MediaSyncEvent.setAudioSessionId(int).

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