Multimedia Insertion

Multimedia Insertion

HTML tools allow you to embed multimedia objects such as audio files, flash clips, Java applets and video on a Web page.

Audio files on Web pages

If your site will have a musical orientation, then without them you will not get along. Audio files can be played directly in the browser. To embed audio in the page code, use the <EMBED> tag, which has the following attributes:

  • SRC - indicates the address and file name for playback. (Always indicated)
  • WIDTH and HEIGHT - dimensions of the control panel. (Always indicated)
  • ALIGN - alignment of the control panel (value-left, right, center, top, baseline).
  • AUTOLOAD - file upload (value - true-autoload; false - without loading)
  • AUTOSTART - playback (value - true-auto; false-by activating the "Play"
  • VOLUME - volume in%
  • CONTROLS - the type of panel elements (value-console-full, small-console - compact)
  • STARTTIME - file start time timer
  • ENDTIME - the timer for the end of playback of a file
  • CONSOLE - saves the parameters of the control panel

All browsers understand audio files of the formats: WAV, AIFF, AU and MIDI. For other files, players are already used, in particular, such a widely distributed RAW format is playing RealAudio (with good quality, and even in real time).

Embedding Flash Files

Today Flash-technologies dictate fashion in the creation of sites. Yes, yes, based on them, you can create entire sites. The size of the pages will be slightly larger than the traditional way. The code for such a page is large, which can not be said about individual flash files. Under the word "Flash-files" you should understand here not only banners (used more often on Web pages), but also full clips with sound. By extension, they need to be divided into two types: the first .fla, whose purpose is to create an animation and the second type is .swf - designed specifically for the Internet. Since we are talking about sites, we will talk about the second type.

Flash files have this feature - even at the stage of their development includes the possibility of automatic generation in HTML-code, which is enough to invest in the right place of the page. However, when adjusting any parameters of the clip on the page itself, it is more expedient to do this in the code of the page than to redo it in the Flash editor. Therefore , you still need to know this information.

When generating the source Flash file, the <OBJECT> tag is used in the HTML code with the attributes and its values ​​listed below:

  • WIDTH and HEIGHT - the width and height of the clip on the page ( px )
  • ALIGN - method of alignment with the usual values ​​for it
  • CODEBASE - the Internet address from where the player will be downloaded
  • CLASSID - transfer control Active X components, the values ​​of which are always indicated: clsid: D27CDB6E-AE6D-11cf-96B8-444553540000

Other characteristics of the clip are described in the < EMBER > tags (atrib - src , quaity , type , pluginspace ) and <PARAM> , which are placed in the <OBJECT> container. The <PARAM> tag has the NAME attribute . The latter has the following meanings:

  • Movie - the address and name of the Flash file (written via "/" )
  • Quality - the quality of the clip display ( low , autolow , high , autohigh , best )
  • Bgcolor - the background color of the clip
  • Wmode - the way the clip is displayed (window-window, transparent and opaque-layers of the page)
  • Scale - scaling the clip ( exactfit -shows scale, show-all - unchanged)
  • Salign - alignment relative to the table cell into which the clip is inserted. (L-left, r-right, t-top, b-bottom, tl-top left, b-bottom left, tr-top right, br-bottom right)
  • Menu - menu view ( true- complete; false- in abbreviated form)
  • Play - play the clip on the page ( true- automatic, false- forced)
  • Loop - cyclic ( true- infinite loop; false- one cycle)

The code for the Flash clip on the page may look something like this:

<OBJECT classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
Codebase = "http://download.macromedia.com/pub/shockwave/cabs / flash / swflash." Cab # version = 6,0,29,0 "width =" 468 "height =" 60 ">
<PARAM name = "movie" value = " address / name of the clip ">
<PARAM name = "quality" value = "high">
<EMBED src = " address / name of the clip "

QUALITY = "high" PLUGINSPAGE = "http://www.macromedia.com/go/getflashplayer"
TYPE = "application / x-shockwave-flash" width = "468" height = "60"> </ EMBED>
</ OBJECT>

Knowing every parameter of the HTML code of the clip can easily change its display on the screen.

Java applet applications on Web pages

Java applets are called small applications written in the Java programming language, which consist of two parts - an applet file with a .class extension and a HTML-code placed on the page. The Java applets are placed on the page in the same way as flash files with the only difference that instead of the <OBJECT> and < EMBER > tags, the <APPLET> tag is applied, which has a number of common ( CODEBASE , WIDTH , HEIGHT , ALIGN and NAME ) and other attributes:

  • CODE - specifies the name of the applet file ( .class )
  • HSPACE and VSPACE - indent from adjacent page elements
  • ALT - comments to the applet

Publish videos online

The placement of video files on the page itself is very rarely used because of their large volumes, but still if this is done by the principle of Flash-files . The most common method is when a normal link is made to a video file on the server. The video file then downloads to the clipboard, and then plays in the player if it has the appropriate codec. To solve the problem of their compatibility, apply the most common formats to date: AVI , MOV , MPEG-4 .

Apply all of the above information in practice.