Android.Widget.VideoView.AddSubtitleSource Method
Adds an external subtitle source file (from the provided input stream.

Syntax

[Android.Runtime.Register("addSubtitleSource", "(Ljava/io/InputStream;Landroid/media/MediaFormat;)V", "GetAddSubtitleSource_Ljava_io_InputStream_Landroid_media_MediaFormat_Handler")]
public virtual void AddSubtitleSource (System.IO.Stream is, Android.Media.MediaFormat format)

Parameters

is
input stream containing the subtitle data. It will be closed by the media framework.
format
the format of the subtitle track(s). Must contain at least the mime type (Android.Media.MediaFormat.KeyMime) and the language (Android.Media.MediaFormat.KeyLanguage) of the file. If the file itself contains the language information, specify "und" for the language.

Remarks

Adds an external subtitle source file (from the provided input stream.) Note that a single external subtitle source may contain multiple or no supported tracks in it. If the source contained at least one track in it, one will receive an Android.Media.MediaPlayer.MEDIA_INFO_METADATA_UPDATE info message. Otherwise, if reading the source takes excessive time, one will receive a Android.Media.MediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT message. If the source contained no supported track (including an empty source file or null input stream), one will receive a Android.Media.MediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE message. One can find the total number of available tracks using Android.Media.MediaPlayer.GetTrackInfo to see what additional tracks become available after this method call.

[Android Documentation]

Requirements

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