Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to slide the video to a particular position in trimmerView using start and end points #17

Open
ajay2c9 opened this issue Oct 24, 2017 · 3 comments

Comments

@ajay2c9
Copy link

ajay2c9 commented Oct 24, 2017

I have a start and end points of a video. I want to scroll the video in the trimmerView programatically. Is there any possibility scroll that particular position in the trimmer View.
Please give suggestions.

@HHK1
Copy link
Owner

HHK1 commented Oct 25, 2017

This is currently not implemented, so you will have to modify the pod directly to do this.

The idea is to convert your time into a position for the trimmer view.
There is a method in the AVAssetTimeSelector that does just that:
getPosition(from time: CMTime) -> CGFloat?

There is something equivalent that has been implemented for the position bar:
public func seek(to time: CMTime)

You'll need to do something similar if you want to move the left and right handlers, as well as the underlying scrollView. I'll let you try by yourself, I currently don't have the time to work on this.
If you get something to work, you can open a pull request to share it with everybody.

@Uk44
Copy link

Uk44 commented Jul 20, 2018

@ajay2c9 this issue solved or not?...if done then pls share code.

@cosmicvarion
Copy link

cosmicvarion commented Mar 11, 2020

I would suggest making the TrimmerView class open so that functionality like this may be added in a custom subclass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants