2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ExoPlayerで早送りと巻き戻しの秒数を設定する

Last updated at Posted at 2019-12-07

定義しているlayoutファイルのViewに
app:fastforward_incerment、app:rewind_incrementを追加する。
app:fastforwardは早送りの秒数、app:rewind_incrementは巻き戻しの秒数を表す。
msで指定しているので、3秒なら"3000"、10秒なら"10000"と記述すればOK。

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
   android:id="@+id/video_view"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   app:fastforward_increment="30000"
   app:rewind_increment="30000"/>

参考記事(Exoplayerを丁寧に解説しているからとても分かりやすい):
https://medium.com/fungjai/playing-video-by-exoplayer-b97903be0b33

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?