Android.Media.MediaPlayer.AddTimedTextSource Method
Adds an external timed text file (FileDescriptor).

Syntax

[Android.Runtime.Register("addTimedTextSource", "(Ljava/io/FileDescriptor;JJLjava/lang/String;)V", "GetAddTimedTextSource_Ljava_io_FileDescriptor_JJLjava_lang_String_Handler")]
public virtual void AddTimedTextSource (Java.IO.FileDescriptor fd, long offset, long length, string mimeType)

Parameters

fd
the FileDescriptor for the file you want to play
offset
the offset into the file where the data to be played starts, in bytes
length
the length in bytes of the data to be played
mime
The mime type of the file. Must be one of the mime types listed above.
mimeType
The mime type of the file. Must be one of the mime types listed above.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the mimeType is not supported.
Java.Lang.IllegalStateExceptionif called in an invalid state.

Remarks

Adds an external timed text file (FileDescriptor). It is the caller's responsibility to close the file descriptor. It is safe to do so as soon as this call returns. Currently supported format is SubRip. Note that a single external timed text source may contain multiple tracks in it. One can find the total number of available tracks using MediaPlayer.GetTrackInfo to see what additional tracks become available after this method call.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 16