This page has been robot translated, sorry for typos if any. Original content here.

Multimedia insert

Multimedia insert

HTML allows you to embed media objects such as audio files, flash clips, Java applets, and videos onto a Web page.

Audio files on web pages

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

  • SRC - specifies the address and file name to play. (always indicated)
  • WIDTH and HEIGHT - dimensions of the control panel. (always indicated)
  • ALIGN - alignment of the control panel (value-left, right, center, top, baseline (baseline lin.)
  • AUTOLOAD - file download (value - true-autoload; false - no download)
  • AUTOSTART - playback (d. - true-auto; false-by activating the "Play" button
  • VOLUME - volume in%
  • CONTROLS - type of panel elements (value-console-full; small-console - compact)
  • STARTTIME - file start time timer
  • ENDTIME - file end timeout timer
  • CONSOLE - saves control panel settings

All browsers understand audio file formats: WAV, AIFF, AU and MIDI. For other files, players are already used, in particular, the currently popular RAW format is played by RealAudio (with good quality, and even in real time).

Embedding Flash Files

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

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

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

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

Other clip characteristics are described in the <EMBER> tags (attrib. - src (clip address), quaity (quality), type (file type), pluginspace (player address)) 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 with "/" )
  • quality - the quality of the clip display ( low , autolow , high , autohigh , best )
  • bgcolor - background color of the clip
  • wmode - way to display a clip (window-window, transparent and opaque-layers of the page)
  • scale - clip scaling ( exactfit - shows the scale, show-all - no change)
  • 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 -abbreviated version)
  • play - play the clip on the page ( true - automatic; false - forced)
  • loop - cyclicity ( true - infinite loop; false - one cycle)

The flash clip code 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 / clip name ">
<PARAM name = "quality" value = "high">
<EMBED src = " address / clip name "

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

Knowing each parameters of the HTML code of the clip, you can easily change the display on the screen.

Applications of Java applets on web pages

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

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

Posting videos online

Placing video files on the page itself is used very rarely because of their large volumes, but still if it is done on the principle of Flash-files . The most commonly used method is: when a regular link is made to a video file located on the server. The video file in this case is swung to the buffer, and then played back in the player if there is a corresponding codec in it. To solve the problem of their compatibility, use the most common formats today: AVI , MOV , MPEG-4 .

Apply all the above information in practice.