⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 media_browservideos.asp@output=print

📁 W3Schools tutorial..web designing
💻 ASP@OUTPUT=PRINT
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>Playing Videos In The Browser</title>
 
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />

<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>

</head>
<body>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

<h1>Playing Videos On The Web</h1>
<a href="media_browsersounds.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="media_windowsformats.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<hr />

<p><b>Videos can be played &quot;inline&quot; or by a &quot;helper&quot;, 
depending on the HTML element you use.</b></p>

<hr />

<h2>Inline Videos</h2>

<p>When a video is included in a web page it is called 
inline video.</p>

<p>Inline video can be added to a web page by using the 
&lt;img&gt; element.</p>

<p>If you plan to use inline videos in your web applications, be aware that many 
people find inline videos annoying. Also note that some users might have turned 
off the inline video option in their browser.</p>

<p>Our best advice is to include inline videos only in web pages where the user 
expects to see a video. An example of this is a page which opens after the 
user has clicked on a link to see the video.</p>

<hr />

<h2>Using A Helper (Plug-In)</h2>

<p>A helper application is a program that can be launched by the browser to 
&quot;help&quot; playing a video. Helper applications are also called Plug-Ins.</p>

<p>Helper applications can be launched using the &lt;embed&gt; element, the &lt;applet&gt; 
element, or the &lt;object&gt; element.</p>

<p>One great advantage of using a helper application is that you can let some 
(or all) of the player settings be controlled by the user.</p>

<p>Most helper applications allow manual (or programmed) control over the volume 
settings and play functions like rewind, pause, stop and play.</p>

<hr />

<h2>Using The &lt;img&gt; Element</h2>

<p>Internet Explorer supports the dynsrc attribute in the &lt;img&gt; element.</p>

<p>The purpose of this element is to embed multimedia elements in web page:</p>

<table width="100%" border="1" class="ex" cellspacing="0">
  <tr>
    <td>
      <pre>&lt;img dynsrc=&quot;video.avi&quot; /&gt;</pre>
    </td>
  </tr>
</table>

<p>The code fraction above displays an AVI file embedded in a web 
page.</p>

<p><b>Note:</b> The dynsrc attribute is not a standard HTML or XHTML attribute. 
It is supported by Internet Explorer only.</p>

<hr />

<h2>Using The &lt;embed&gt; Element</h2>

<p>Internet Explorer and Netscape both support an element called &lt;embed&gt;.</p>

<p>The purpose of this element is to embed multimedia elements in web page:</p>

<table width="100%" border="1" class="ex" cellspacing="0">
  <tr>
    <td>
      <pre>&lt;embed src=&quot;video.avi&quot; /&gt;</pre>
    </td>
  </tr>
</table>

<p>The code fraction above displays an AVI file embedded in a web 
page.</p>

<p>A list of attributes for the &lt;embed&gt; element can be found in a later chapter 
of this tutorial.</p>

<p><b>Note:</b> The &lt;embed&gt; element is supported by both Internet Explorer and 
Netscape, but it is not a standard HTML or XHTML element. 
The World Wide Web Consortium (W3C) recommend using the &lt;object&gt; element 
instead.</p>

<hr />

<h2>Using The &lt;object&gt; Element</h2>

<p>Internet Explorer and Netscape both support an HTML element called &lt;object&gt;.</p>

<p>The purpose of this element is to embed multimedia elements in web page:</p>

<table width="100%" border="1" class="ex" cellspacing="0">
  <tr>
    <td>
      <pre>&lt;object data=&quot;video.avi&quot; type=&quot;video/avi&quot; /&gt;</pre>
    </td>
  </tr>
</table>

<p>The code fraction above displays an AVI file embedded in a web 
page.</p>

<p>A list of attributes for the &lt;object&gt; element can be found in a later chapter 
of this tutorial.</p>

<hr />

<h2>Using A Hyperlink</h2>

<p>If a web page includes a hyperlink to a media file, most browsers will use a 
&quot;helper application&quot; to play the file:</p>

<table width="100%" border="1" class="ex" cellspacing="0">
  <tr>
    <td>
      <pre>&lt;a href=&quot;video.avi&quot;&gt;
Click here to play a video file
&lt;/a&gt;</pre>
    </td>
  </tr>
</table>

<p>The code fraction above displays a link to an AVI file. If the user clicks on 
the link, the browser will launch a helper application like Windows Media Player 
to play the AVI file.</p>

<hr />

<a href="media_browsersounds.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="media_windowsformats.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>

<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -