Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Location
    The Netherlands
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Youtube video control

    Hello,

    Thanks for reading! I would like to control a Youtube video by javascript on the Youtube website itself (not embedded). I know there is a Youtube API to control embedded video's but, its not working on the Youtube website it self.

    If you wonder why I want this, its because I have a webbrowser control inside my C# application. When a user uses my application and visites the website Youtube I would like the user to be able to control the play/stop/pause from my application rather then the webbrowser flash.

    I tried to use the Youtube API like this:
    Code:
    window.getElementById("movie_player").playVideo();
    But it only works with embedded versions. Also I've looked at Greasemonkey scripts but I can't get it to work.

    Can someone please help me? Thanks

    Kind reguards,

    Mike

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,880
    Thanks
    6
    Thanked 1,035 Times in 1,008 Posts
    Buy YouTube from Google and you can do whatever you want with it. Until then you have to get used to the fact that you can’t influence remote sites.

  • #3
    New to the CF scene
    Join Date
    Jul 2012
    Location
    The Netherlands
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @VIPStephan, sorry what part of your awsner is relevant for a solution to my question? If you don't have anything relevant to say, please don't post anything.

  • #4
    Regular Coder nomanic's Avatar
    Join Date
    Feb 2009
    Location
    United Kingdom
    Posts
    255
    Thanks
    9
    Thanked 33 Times in 33 Posts
    VIPStephen is talking total sense
    <DmncAtrny> I will write on a huge cement block "BY ACCEPTING THIS BRICK THROUGH YOUR WINDOW, YOU ACCEPT IT AS IS AND AGREE TO MY DISCLAIMER OF ALL WARRANTIES, EXPRESS OR IMPLIED, AS WELL AS DISCLAIMERS OF ALL LIABILITY, DIRECT, INDIRECT, CONSEQUENTIAL OR INCIDENTAL, THAT MAY ARISE FROM THE INSTALLATION OF THIS BRICK INTO YOUR BUILDING."
    <DmncAtrny> And then hurl it through the window of a Sony officer
    <DmncAtrny> and run like hell

    Portfolio, Tutorials - http://www.nomanic.biz/

  • #5
    New to the CF scene
    Join Date
    Jul 2012
    Location
    The Netherlands
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @nomanic, I didn't say it doesn't make any sence. I just expect javascript awnsers inside a javascript forum category, doesn't that make any sence?

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,880
    Thanks
    6
    Thanked 1,035 Times in 1,008 Posts
    OK, I give you a JavaScript solution:
    Code:
    alert('Impossible!');

  • #7
    New to the CF scene
    Join Date
    Jul 2012
    Location
    The Netherlands
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @VIPStephan, sorry that only shows a alert window. If you still think this can help me, you should check out the basics of javascript here http://www.w3schools.com/js/js_popup.asp.

    I think I need to invoke a already existing function that Youtube uses. Can somebody else help me please?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •