search
HomeWeb Front-endHTML TutorialHow to insert video using object and embed tags in html?

1. Object

For object, w3c defines object as an embedded object. You can use this element to add multimedia to your XHTML pages. This element allows you to specify data and parameters for objects inserted into an HTML document, as well as code that can be used to display and manipulate the data. The tag is used to contain objects such as images, audio, video, Java applets, ActiveX, PDF, and Flash. The original intention of object was to replace the img and applet elements. However, this did not happen due to bugs and lack of browser support. The browser's object support depends on the object type. Unfortunately, major browsers all use different code to load the same object types. And luckily, object Objects provide solutions. If the object element is not shown, the code between and is executed. This way we can nest multiple object elements (one for each browser).

2. Object and embed

If we want to display the flash content normally in the web page, there must be a tag specifying the flash path in the page. That is, the object and embed tags. The
object tag is used for the IE browser on the windows platform, while embed is used for the Netscape Navigator browser under the windows and Macintosh platforms and the IE browser under the Macintosh platform.
IE on the windows platform uses Activex controls to play flash, while other browsers use Netscape plug-in technology to play flash.

The difference between and tags:
Both are objects used to play multimedia files, the object element is used for IE browsers, and the embed element is used for non-IE browsers , in order to ensure compatibility, usually we use two elements at the same time, and the browser will automatically ignore tags it does not support. When using two elements at the same time, the tag should be placed inside the tag.

The following is the code display

<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="700" height="400">
	<param name="movie" value="How to insert video using object and embed tags in html?.swf" />
	<param name="quality" value="high" />
	<param name="allowFullScreen" value="true" />
	<param name="FlashVars" value="vcastr_file=12.flv&LogoText=description&BufferTime=3&IsAutoPlay=1">
	<embed src="How to insert video using object and embed tags in html?.swf" allowfullscreen="true" flashvars="vcastr_file=12.flv&IsAutoPlay=1&LogoUrl=images/logo.jpg" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="700" height="400"></embed>
</object>

After my own test, the flv or mp4 format can be played successfully

Player How to insert video using object and embed tags in html?.swfFile downloadAddress: How to insert video using object and embed tags in html?.swf

The following is the player style:

How to insert video using object and embed tags in html?

Attribute parameters

  • vcastr_file Method 2 passes the video flv file address parameter, use | to separate multiple spaces

  • vcastr_title Video title parameters, multiple use | separate, use empty with method 2

  • vcastr_xml Method 3 Pass the video flv file address parameter, for a sample, refer to vcastr .xml

  • IsAutoPlay Video auto-play parameters: 0 means not to play automatically, 1 means to play automatically 0

  • Is<a href="http://www.php.cn/wiki/131.html" target="_blank">Continue</a> Video continuous playback parameters: 0 means non-continuous playback, 1 means continuous loop playback 1

  • IsRandom Video Random play parameter: 0 means no random play, 1 means random play 0

  • DefaultVolume Default volume parameter: 0-100 value, set the default volume at the beginning of the video 100

  • Bar<a href="http://www.php.cn/wiki/902.html" target="_blank">Position</a> Control bar position parameter: 0 means floating display on the video, 1 means displaying 0

    below the video
  • IsShowBar Control bar display parameters: 0 means not displayed; 1 means always displayed; 2 means displayed when the mouse is hovering; 3 means not displayed at first and displayed after the mouse is hovered. 2

  • BarColor Playback control bar color, colors start with 0x and represent hexadecimal numbers 0×000033

  • BarTransparent Playback control bar transparency 60

  • GlowColor Key icon color, the color starts with 0x and is expressed as a hexadecimal number 0x66ff00

  • IconColor The halo color when the mouse is hovering. The color starts with 0x and is expressed as a hexadecimal number 0xFFFFFF

  • ##TextColor Player text color, the color starts with 0x and represents 0xFFFFFF as a hexadecimal number

  • LogoText You can add your own website name and other information (English) empty

  • LogoUrl You can read the logo image from the outside, be careful to adjust the logo size yourself, support image format and swf format empty

  • EndSwf After the video is played, the swf file is read from the outside. You can add relevant video information, video sharing and other information. You need to create the empty space yourself

  • BeginSwf Before the video starts playing, read the swf file from the outside. You can add advertisements or website information. You need to make your own space.

  • IsShowTime Whether to display the time: 0 means not to display the time, 1 means to display the time 1

  • BufferTime Video buffering time, unit (second) 2

The above is the detailed content of How to insert video using object and embed tags in html?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use