¿Cómo puedo simular un toque en un UIWebView?

I want to automatically play a YouTube video but because of how YouTube's view counter is set up, autoplay views will not count as views.

How can I simulate a user interaction tap in a UIWebView so YouTube thinks that the user pressed/tapped play?

Or do you "think" that a very near version of iOS will support this? Trying to phrase that in NDA accordance. Do you think it would work if I changed the user agent of the UIWebView to a desktop user agent and displayed a standard YouTube page?

On the desktop YouTube videos autoplay on Youtube.com but this does not work on mobile.

Yo he puesto mediaPlaybackRequiresUserAction al no.

preguntado el 09 de septiembre de 13 a las 23:09

Youtube has better anti autoclick detection than you seem to think. -

Ugh, I was afraid of answers like that. I don't see how possible it is for them to protect it. With non-public APIs this is easy. -

@Overcode What about my user agent idea? Would that not work? -

Youtube obviously doesn't have a public API for reasons like this. The site records some other information that you probably don't have, most notably IP, which I believe is their main method of tracking clicks. -

@Overcode I was talking about an iOS API. And the IP would not matter because the request would originate from a UIWebView on the clients network without my server as an intermediary. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.