is it possible to give x,y coordinate width and height and only see video ?
example , start youtube, select movie, then start a new small xy.hta see only video
A better way to do it would be to use the embed code that YouTube gives you for the video. People usually use it for blogs and myspace, but there's no reason it won't work in an .hta file.
I thought your idea was neat, however, so I decided to take a shot at coding it. Basically the script grabs a basic (local) template for displaying a YouTube video but replaces the video ID with one that you specify, then it creates a new hta file, executes it, and resizes it so it's just big enough for the video to be displayed.
Here's the html template (in the code it's referenced as YouTubeTemplate.txt, which is stored in the same directory as the script):
<HTML>
<HEAD>
<TITLE>YouTube Viewer</TITLE>
<style type="text/css">
body {
background-color: #000000;
margin: 0px;
padding: 0px;
color: #fff;
overflow-y: hidden;
}
</style>
</HEAD>
<BODY>
<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/--vidID--&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/--vidID--&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
</BODY>
</HTML>
The "overflow-y: hidden;" bit of CSS will hide the vertical scrollbar since it's not needed and is just taking up space.
And here's the script:
; Prompt user for URL to the YouTube video.
InputBox, videoURL, Enter the video's url
; Strip everything but the last bit (the video ID, basically)
videoURL := RegExReplace(videoURL, ".*\?v=", " ")
; Trim the space we just made
StringTrimLeft, videoURL, videoURL, 1
; Grab our template...
FileRead, outputHTML, %A_ScriptDir%\YouTubeTemplate.txt
; Replace the --vidID-- with the actual video ID
StringReplace, outputHTML, outputHTML, --vidID--, %videoURL%, All
; Delete the hta file if it exists so that we don't keep adding to it
FileDelete, %A_ScriptDir%\YouTubeViewer.hta
; Then make a new one and put the output HTML into it and run it
FileAppend, %outputHTML%, %A_ScriptDir%\YouTubeViewer.hta
Run, %A_ScriptDir%\YouTubeViewer.hta
; This will resize the window so it's only big enough to show the video.
; You may need to change the dimensions below since title bar thickness
; can vary depending on desktop themes and such.
WinWait, YouTube Viewer
WinMove, YouTube Viewer,,,,440,395
Getting the video's URL via InputBox is just a quick, dirty, proof-of-concept way to do it. You could do some clever stuff like scan your internet bookmarks for YouTube links and present a list of them in a GUI - a YouTube DVR of sorts.