LJaraCastillo / native_video_view

A video player widget displayed using the platform native player (VideoView in Android and AVPlayer in iOS).
MIT License
37 stars 30 forks source link

on Android seekTo moves to only seconds, not milliseconds(1100 and 1900 are same position) #16

Closed ianack closed 2 years ago

ianack commented 2 years ago

on Android when i use seekto with video controller, 1100ms and 1900ms gives same frame

LJaraCastillo commented 2 years ago

Tested it and it seems that is how the VideoView works.

ianack commented 2 years ago

Hi, i just looked in to it again and found out that when implement seekto function, use Mediaplayer like

mediaPlayer?.seekTo(position, SEEK_CLOSEST)

is better than videoview.seekTo(position)

mediaPlayer's seekto function's second parameter is very useful to find exact position of video frame.

i suggest :) thanks for library