2016-08-16 8 views

答えて

0

ExoPlayerを活用しようとお勧めします.ExoPlayerはAndroidでかなりサポートされています。スレッドは、このサンプルコードが含まれてhttps://github.com/google/ExoPlayer/issues/587

:スレッドがExoPlayerで.SRT字幕のサポートにここにあり

MediaFormat mediaFormat = MediaFormat.createTextFormat("0", MimeTypes.APPLICATION_SUBRIP, MediaFormat.NO_VALUE, C.MATCH_LONGEST_US, null); 
Uri uri = Uri.parse("file:///android_asset/german.srt"); 
SingleSampleSource textSampleSource = new SingleSampleSource(uri, new AssetDataSource(this), mediaFormat); 
TrackRenderer renderer = new TextTrackRenderer(textSampleSource, this, getMainLooper()); 

exo = ExoPlayer.Factory.newInstance(1); 
exo.addListener(this); 
exo.prepare(renderer); 
exo.setPlayWhenReady(true); 

あり、ライブラリ、ラッパーを提供ExoMedia、 ExoPlayerと同様のアプローチを使用することができます。https://github.com/brianwernick/ExoMedia/

+0

ありがとうございました。 –

+0

Mick - どのようにこれをexoで使用しますかメディア? –

+0

開発ブランチではまだ開発中です。https://github.com/brianwernick/ExoMedia/issues/115を参照してください。テキストをビデオビューに重ねる必要があるのは、簡単な方法があるからです。 – Mick

関連する問題