November 12, 2006

Customize the Embedded Google Video Player

If you go to Google Video, you can get a code that allows you to embed a video into your site. Although Google doesn't mention that, the Flash player used by Google Video (googleplayer.swf) lets you customize many parameters. In the code obtained from Google, you'll see in the src attribute: http://video.google.com/googleplayer.swf?docId=[number]&hl=en. You can add more parameters to the player, not just docId and hl. Here are some of the more interesting.

* playerMode lets you change the skin of the player.

playerMode=simple (a basic version of the player without progress bar and volume control, you can see it in the screenshot below)
playerMode=mini (even more basic)
playerMode=clickToPlay (the skin used for video ads)
playerMode=embedded (the standard skin)

* autoPlay lets you control if the video starts automatically.
autoPlay=true
autoPlay=false (by default)

* loop lets you repeat a video indefinitely.
loop=true
loop=false (by default)

* showShareButtons is useful if you want to add a button at the end of the video that says "Send link to a friend".
showShareButtons=true
showShareButtons=false (by default)

So here's one of example of customized player, that repeats a video and shows a simplified skin:
http://video.google.com/googleplayer.swf?docId=[number] &loop=true&playerMode=simple

18 comments:

  1. Just what I needed on my site! Very usefil indeed, instant star in my reader.

    ReplyDelete
  2. Thanks for the customized coding! I've tried to find the best solution to change standard Google video interface; here they are. The videos on my blog, http://www.telecombooksblog.com, look much clean now.

    btw, I also added a link on my video page to link back here.

    ReplyDelete
  3. Dear Alex, thanks for your great work.
    I tried the different playerModes, but I do not like the big black frame around the video, wich is not in playerMode=embedded

    I really miss the feature to upload Flash videos to Google Video. I read at a Google Group, that Google doesn't want you to have the possebility to place URLs as layers on the content (like they have the Play-Again-Layer now) Is that the case ? Its really bad, as Flash is such a powerful tool not only for artists and it gets excluded from the Google video public. Best regards, Hans

    ReplyDelete
  4. Hi! My problem is: tabbing navigation ignores the play button of the googleplayer: the button will not receive focus durant tabbing. Is there a parameter to set ? Any hint ? Thanks for your answer...

    ReplyDelete
  5. Hi!
    Where can I find all the parameters with wich I can customize the google video player?
    Thanks

    ReplyDelete
  6. thanks, it is very helpful.

    ReplyDelete
  7. that is really fantastic post, thanks. it helps me a lot.

    ReplyDelete
  8. Can we have the playerMode=Mini with progress bar that we can move back and forth?

    ReplyDelete
  9. Hi!, I wonder if it is possible to make a personalized skin por a google embed video????
    Plssss I really need to know this!!!
    write to my email just_cinthy@yahoo.es

    ReplyDelete
  10. very well explained, tks

    ReplyDelete
  11. Hello..I tried using mini mode..its showing like link..and if we click on that video its showing the Java Script Error may i know how to solve that?

    ReplyDelete
  12. I would like to know what parameters would setup the subtitle language (enabling the subtitle is made by "subtitle=on").

    Here's the url: http://video.google.com/googleplayer.swf?docId=7653564598486729089&hl=fr&subtitle=on

    (I would like to set the subtitles to appear in english and not german without clicking the menu button)

    ReplyDelete
  13. omg elgoog can not load anymore! it just reloads over and over again! WTH???!!!

    ReplyDelete
  14. This is pretty much all that can be modified. Remember it is Google's player that you are using. If you want more modifications or other things like "Full Window" then you will need to have your own swf player and then somehow source the movie id. This is not an easy cut and paste solution and you will have to know about PHP etc...
    Read this for more information http://www.longtailvideo.com/jw/?search=google

    Go here for an example http://www.previewfilms.net

    ReplyDelete
  15. How to play google video player in windows media player?
    I've downloaded a google video player file but I wanted to play it in Windows media player please help

    ReplyDelete
  16. You can't open MP4 files in Windows Media Player without installing some codecs (like FFDShow). A much better idea is to try VLC, a free player that comes with the most popular codecs and it can play MP4 files.

    ReplyDelete
  17. unfortunately embed codes are not working anymore. videos are not working on blogs

    ReplyDelete

Note: Only a member of this blog may post a comment.