SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2010
    Location
    Israel
    Posts
    523
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Video controls in JS

    hey guys,
    i got a video which have buttons to play, pause and stop
    i wanted to add a button to enlarge the video to full screen, is there anyway to do it in JS?
    for my buttons i use it like that:
    Code:
    <script type="text/javascript">
        function play() {
            if (ytplayer) {
                ytplayer.playVideo();
            }
        }
        function pause() {
            if (ytplayer) {
                ytplayer.pauseVideo();
            }
        }
        function stop() {
            if (ytplayer) {
                ytplayer.stopVideo();
            }
        }
    </script>
    thanks

  2. #2
    SitePoint Guru whisher's Avatar
    Join Date
    May 2006
    Location
    Kakiland
    Posts
    732
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    http://code.google.com/apis/youtube/...reference.html
    the only thing can be useful is
    Code JavaScript:
    player.setSize(width:Number, height:Number):Void
    but I don't know if it works the way you want (never used)

    Bye.


Bookmarks

Posting Permissions

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