@embedYouTube(ID, [WIDTH], [HEIGHT])

Embeds a YouTube video within the page.

The following parameters are recognized:

ID

The ID of the YouTube video (like: Uqk7iGYMvbE).

[WIDTH]

The width of video view area on the page (defaults to 640).

[HEIGHT]

The height of video view area on the page (defaults to 360).

This macro is useful when you want to embed a YouTube video directly within the page. You can set the size of view area (it defaults to 640x360 if omitted). The user will be able to control the video and even display it in full screen mode.

Example of using the macro:

@embedYouTube("Uqk7iGYMvbE",640,360)

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/html.at macros file has been generated (Hint: run make atmacros in the wui directory), a developer should be able to run the above example by copy/pasting from below:

[root@probe root]# java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
@embedYouTube("Uqk7iGYMvbE",640,360)
EOF

This macro is defined as:

@define("youTubeId","0","ifnew")@increment("youTubeId")
<div@htmlAttr("id","youTube@youTubeId()")@htmlAttr("class","YouTubeArea")@htmlAttr("style","width: @param(1)px;")></div>
@javascriptBegin()
NstDom.appendYouTube('youTube@youTubeId()', '@param(0)', @param(1), @param(2));
@javascriptEnd()