Method for embedding audio and video in the page (1)
Adding audio and video in the web page to sufficiently display the multimedia characteristics of the web page, especially with the popularity of broadband networks, making network broadcast and network video a reality, web audio and video importance is also increasingly high. Specifically, the embedding method of webpage audio and video is three:
I. BGSOUND (1), basic syntax: BGSOUND SRC = URL Description: BGSound is used to insert background music, but only for IE browser and a browser that is kernel with IE. The URL is an audio file and its path, which can be a relative path or an absolute path. Example:
(2), attribute setting: Because BGSound embedded audio files do not have a control display in the web page, it must be set when using BGSOUND. 1, Auto Play: Syntax: AutoStart = true, false Description: This property specifies whether the music file is automatically played after downloading. True: The music file is automatically played after downloading; false: The music file is not automatically played after downloading. Example:
2, loop play: syntax: loop = positive integer or infinite description: This property specifies the number of loops in the music file. When the attribute value is a positive integer value, the number of cycles of music files is the same as the correcting value; when the attribute value is Infinite, the music file repeatedly played, and the loop is more than the loop. Example:
Second, Embed (1), Basic Syntax: Embed SRC = URL Description: Embed can be used to insert a variety of multimedia, format can be MIDI, WAV, AIFF, AU, MP3, etc., Netscape and the new version of IE support. The URL is an audio or video file and its path, which can be a relative path or an absolute path. Example:
(2), attribute setting: 1, automatic play: Syntax: AutoStart = true, false Description: This property specifies whether audio or video files are automatically played after downloading. True: The music file is automatically played after downloading; false: The music file is not automatically played after downloading. Example:
2, loop playback: grammar: loop = positive integer, true, false Description: This property specifies whether the audio or video file is looped and the number of cycles. When the attribute value is a positive integer value, the number of cycles of the audio or video file is the same as the correcting value; the audio or video file is loop when the property value is true; the attribute value is false, the audio or video file is not looped. Example:
4. Start time: Syntax: StartTime = mm: SS (minute: second) Description: This property specifies the time of audio or video file start playing. Not defined will play from the beginning. Example:
5, Volume Size: Syntax: Volume = 0-100 Integer Description: This property specifies the volume of the audio or video file. Undefined, the system itself is used. Example:
6, Container Properties: Syntax: Height = # width = # Description: The value is positive or percentage, and the unit is pixel. This attribute specifies the height and width of the control panel. Height: The height of the control panel; Width: The width of the control panel. Example:
7, container unit: Syntax: Units = Pixels, EN Description: This property specifies the high and wide units of Pixels or EN. Example:
8, appearance setting: syntax: Controls = Console, SmallConsole, PlayButton, PauseButton, StopButton, Volumelever Description: This property specifies the appearance of the control panel. The default is console. Console: General Panel; SmallConsole: Small panel; PlayButton: Only display the play button; PauseButton: STOPButton: Only the stop button is displayed; VolumeLever: Only the volume adjustment button is displayed. Example:
10, Description Text: Syntax: Title = # Description: # for the description. This attribute specifies the description text of the audio or video file. Example:
11, foreground color and background color: Syntax: Palette = Color | Color Description: This property represents the foreground color and background color of the embedded audio or video file, the first value is the foreground color, the second value is the background color, the middle Use | separated. Color can be RGB (rrggbb) or a color name, and can also be Transparent. Example:
12, aligned: grammar: Align = TOP, Bottom, Center, Baseline, Left, Right, Texttop, Middle, Absmiddle, Absbottom Description: This property specifies the alignment of the control panel and the object in the current row. Center: Control Panel Case; LEFT: Control Panel Huiji left; Right: Control panel home; Top: The top of the control panel is aligned with the top of the highest object in the current row; Bottom: The bottom of the control panel and the baseline of the object in the current line Align; Baseline: The bottom of the control panel is aligned with the baseline of the text; the top of the control panel is aligned with the top of the highest text in the current row; Middle: Control panel is aligned with the baseline of the current line; Absmiddle: Control panel Align with the intermediate of the current text or object; ABSBOTTOM: The bottom of the control panel is aligned with the bottom of the text. Example:
(2) Attribute setting: 1. Preset picture: Syntax: SRC = URL Description: URL is the image file and its path, which can be relative path or absolute path. The effect of this property is when the video file is downloaded, the image occupies the display position of the video file; the video file download is complete, the picture is masked, the video file is displayed. If you specify the DYNSRC for an audio file, the src property is blocked and the picture is not visible. Example:
2, play event: Syntax: Start = fileopen, Mouseover Description: This property specifies the event of file playback, the default value is FileOpen. It can also be set simultaneously. In addition, use the mouse to click on the play area and will make the browser start playing the file. FileOpen: When the file is opened; Mouseover: When the mouse is moved to the play area. Example:
3, Container Properties: Syntax: Height = # width = # Description: The value is positive or percentage. This attribute specifies the height and width of the control panel. HEIGHT: The height of the control panel: the width example of the control panel: 4, Description Text: Syntax: ALT = # Description: # For the description text. The value of Alt is a non-display instructions for animation files. Example:
5, control display: Syntax: Controls Description: Use the MS-Windows playback control strip to attach to the video window. Example:
6, loop playback: grammatical: loop = positive integer or infinite description: This property specifies the number of cycles of audio or video file, when the property value is -1 or infinite, the audio or video file repeatedly played, and the loop is more than a loop. When the attribute value is a positive integer value, the number of cycles of the audio or video file is the same as the correcting value; when the attribute value is Infinite, the audio or video file repeatedly played repeatedly, and the loop is more than the cycle. Example:
7, delay playback: Syntax: loopdelay = # Description: # = milliseconds. This attribute specifies the delay playback time of the audio or video file. Example:
8, filling the white attribute: grammar: hspace = # vSpace = # Description: The value is positive and the unit is pixel. The two properties should be applied at the same time. HSPACE: The distance from the left side of the page; vSpace: The scaway is from the distance from the top of the page. Example: