Insert a video in the web page

xiaoxiao2021-03-06  40

There are two ways to insert a movie in the web page, one is without a player interface, and the other is with the player interface, the publishing of these two ways does not require a complex program code, and no more affordable procedures Design, follow these steps you can learn to release online movies in just a few minutes:

First, the movie that does not have a player

This method does not appear players in the web browser, but use the shortcut menu command to control the playback and stop of the movie, the specific steps are:

1. Run the FrontPage 2002 program to ensure that the web page is in the view mode, then move the mouse to the menu bar, execute the "Insert" / "Image" command, and then the system will automatically open a file selection dialog box, In this dialog, you can select the movie video file you need to publish, and click the "OK" button in the dialog so you can insert the target movie into the web page;

2, the inserted movie file is only displayed as a small icon in web page editing mode, and you can only enjoy its normal content only in the preview state or use the browser to open this web page;

3. In order to make the movie play according to the appropriate manner, you also need to set some parameter settings to the inserted movie file to specify

Online movies playing mode; when you are set, you can right-click the video file icon, and execute the "Image Properties" command from the subsequent open shortcut menu;

4, in the "Picture Properties" dialog box pop-up, you first open the "Video" tab and select "Repeat" option, and of course you can set a movie only looped a limited number of times, and set up Enter the appropriate number size at the field;

5. In this tab page, if you need to pause after the movie is played again, check the "Cycle Delay" option, and the number of specific time required to be paused here is how much milliseconds;

6, everyone can also

Online movies start playback, for example, if the movie is automatically executed when the web file is opened, or the setting will start playing a movie when the mouse is hovering on the screen; after completing the above settings, everyone can execute "preview "The command checks if the movie can play correctly and play the effect; if the playback effect is not ideal, you can cancel the preview, reset the movie play parameters until the adjustment is appropriate; to this, everyone can complete simple movie release tasks .

7. If you don't have a special tool such as FrontPage, you can also insert movie playback code directly into the web page source file to realize the release of online movies: You can insert any picture in the web page, and use Notepad Open the source code file for this page and find the "

8. Change the "SRC" image tag name in this statement to the video tag name "DYNSRC", and point the property value of the tag to the relative path and file name of the target movie file; for example, in the E disk If the aaa.avi movie is published online, you can insert " "in the web page source code.

9. After completing the code insertion, you re-save the page into an HTML file, and use the browser to watch, you can see your own movie. If you find that the inserted movie picture is too small or non-proportional, you can reopen the web source code file and add the corresponding movie playback control code to make the movie screen and playback in the playback. 10. You can use the control movie size in the IMG statement "width =" xx "height =" xx "" to set the screen size of the movie, if this tag property is canceled, the browser will automatically follow the original movie Play

The size is displayed on the browser;

11. In the IMG statement, you can also add the mark "start =" ... ", if you want everyone to be automatically played when the web is accessed, you can set it to" start = "FileOpen" "; If you want the movie to start playing when the movie hovers on the movie screen, you can set it as" start = "mouseover", so the mouse can be movie when the mouse is hovering on the movie screen. Autoplay;

12. In addition, everyone can add tags that control the number of repetitive playbacks in the IMG statement.

LOOP = "...", let online movies play movies according to what you need; if you set their value to "loop =" infinite ", the online movie will automatically loop automatically; but everyone just wants If you play a movie over, you can not use the "loop" tag;

13. Use the "loopdelay =" ... "tag to set the movie at the time interval each time you repeat play, for example, if you set its value to" loopdelay = "2", it means that the time you want to pause is 2 秒.

Through the above settings, a wonderful movie will be played normally on the web page. Of course, this online movie playback effect may not be very ideal. To get a higher effect movie, everyone must also learn the movie release skills with the player.

Second, the film released with the player

In order to make the viewer play and enjoy the movie in accordance with its own will, you can use the following methods to implement movies with the player:

1. Run the FrontPage 2002 program, execute the "Insert" / "Web Component" command in the menu bar, then FRONTPAGE 2002 can open a dialog that titled "Web Components";

2. In the "Component Type" option of this dialog box, you use the mouse to select the Advanced Control option, and will "select a control" option.

ActiveX Controls Select;

3, next to the "Insert ActiveX Control" dialog box, you select the "Windows Media Player" option, such a play control interface is inserted into the web page, and you can open the page in the browser. See this player;

4. Right-click the "ActiveX Control Properties" command in the shortcut menu that is then popped up, so that the system opens the Options dialog. Select the "Play" tab in this dialog, and further set various attribute parameters of the playback, such as the number of loops played, played

Size and play volume and other content to ensure that all viewers can easily control on the web page

Online movie;

5. After setting the play attribute, you can switch the FrontPage 2002 program interface to the "html" view mode, and find "" statement and "Value" attribute in the statement The value is set to "Value =" *. * "", "*. *" Indicates the movie file name that needs to be published online and the relative path of the file is stored. In addition, everyone can modify the attribute values ​​of the other tags of the statement as needed; Add the following fields to the HTML source file:

ID = "MediaPlayer1">

// filename represents the name of the movie, *. * Indicates the location of the movie file.

Then re-save the web file so that the web page can be inserted into the playback controller and movie;

7. Of course, it is just the most basic code. In order to better control the playback of the movie, you should also need to add the following code for playback control in the HTML source file:

//

a Represents repeated play movies several times, if it is 0, let the movie infinitely loop;

//

A indicates whether the movie is automatically played, and the automatic play is 1, 0 is the button playback;

// A is 1 means that the mouse click to control the playback or pause status, and 0 is disabled;

// a is 1 to play according to the original size

// A is 1 means that it is allowed to switch to full screen, and switching is prohibited.

// A is 1 means that the volume is allowed to adjust, and the adjustment is prohibited;

// A is 1 means that the right-click menu is allowed, and the right-click menu is disabled for 0;

8. After entering the code correctly, save the web file again, then open the web page with your browser, you can use the play controller to freely play online movies in the web page.

转载请注明原文地址:https://www.9cbs.com/read-77750.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.061, SQL: 9