Reputation: 225
I have a button that do the following code:
thePlayer.stop()
where thePlayer
is my video player using VLCKit.
The thePlayer.position
doesn't reset to 0
after I pressed that button and I can't set to 0
manually by using thePlayer.position = 0
, because I didn't change anything. When I print the position, it prints me the value just before it stopped.
Also it seems that thePlayer.time
following by anything after that is get only value...
I would like to set the value of thePlayer.position
to 0
so when I press the Play button my slider doesn't jump back quickly to the last position before I stopped and then get back near the beginning.
EDIT:
I'm using version 3.1.2 of VLCKit via cocoapods.
Upvotes: 2
Views: 1018
Reputation: 353
I'm not sure that you want to stop the media playback. If you want to reset the mediaPlayer's position, you can simply set it manually just how you described without calling stop()
:
mediaPlayer.position = 0
Upvotes: 1