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

Syntax

[Android.Runtime.Register("addTimedTextSource", "(Landroid/content/Context;Landroid/net/Uri;Ljava/lang/String;)V", "GetAddTimedTextSource_Landroid_content_Context_Landroid_net_Uri_Ljava_lang_String_Handler")]
public virtual void AddTimedTextSource (Android.Content.Context context, Android.Net.Uri uri, string mimeType)

Parameters

context
the Context to use when resolving the Uri
uri
the Content URI of the data you want to play
mimeType
The mime type of the file. Must be one of the mime types listed above.

Exceptions

TypeReason
Java.IO.IOExceptionif the file cannot be accessed or is corrupted.
Java.Lang.IllegalArgumentExceptionif the mimeType is not supported.
Java.Lang.IllegalStateExceptionif called in an invalid state.

Remarks

Adds an external timed text source file (Uri). Currently supported format is SubRip with the file extension .srt, case insensitive. 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