c# - It is possible to play/stop a youtube video using external software? -


It is possible to stop / prevent YouTube videos (inside a web browser like Firefox) using external software (C #) ?

I think this is not allowed by the YouTube Terms of Service, but I'm not sure. In any case, if it is more than a pet project or proof of concept, then there are some ideas:

  • I suspect that any existing library, etc ... which is B / C can be of the TOS point.
  • Perhaps you can create it as yourself:
    • Load a page in a web browser form control.
    • After the page has loaded (DocumentCompleted event), search the DOM (browser.Document) for the video player element. You might search for Flash elements or some common CSS class / ID that YouTube always uses.
    • Get the screen position of that element It is not certain how to do this, maybe you can find out?
    • Simulate a mouse click () on the video player.

Once the screen status is found, you have to click the mouse at a later time. I like the above approach because you can easily turn it off from other video sites rather than trusting the API.

I'm also curious why you want to do this. Can you tell us about your thoughts?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -