0

I'm having a video, on which I want my users to draw on the video. I'm able to achieve that. However, when the device orientation gets changed, the drawing gets distorted. The demo source code can be found from below link:

https://www.dropbox.com/s/hkrmqgplgfd53mo/DrawPathOnVideo%204.zip?dl=0

The goal I want to achieve is to allow users draw on AVPlayer, when the video is paused. When the video is played again, the images should appear at that time. Any ready mode controls, if available??

Henit Nathwani
  • 442
  • 3
  • 10
  • You are drawing any shape by free hand drawing or you are adding image object? – Bhadresh Mulsaniya Jun 28 '16 at 07:26
  • I want to provide ability to draw as well as place shapes like circle, squares, etc – Henit Nathwani Jun 28 '16 at 08:34
  • I did something similar, though I've just prevented the drawing view to rotate (which makes sense in my opinion). You can find my question AND my solution here: http://stackoverflow.com/questions/28505772/disable-autorotate-on-a-single-subview-in-ios8 – Jan Jun 28 '16 at 11:27

1 Answers1

-1

You have to store the x,y coordinates of the shape with particular time inside database.

And when you play the video at that time you have to draw that shape again based on x, y coordinate. When you change the orientation at that time you have to apply some maths for the same.

Bhadresh Mulsaniya
  • 2,610
  • 1
  • 12
  • 25