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

📄 mediaplayer.html

📁 JMF原版英文说明文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sat May 20 18:57:49 PDT 2000 --><TITLE>: Class  MediaPlayer</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../javax/media/bean/playerbean/MediaPlayerBeanInfo.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="MediaPlayer.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.bean.playerbean</FONT><BR>Class  MediaPlayer</H2><PRE>java.lang.Object  |  +--java.awt.Component        |        +--java.awt.Container              |              +--<B>javax.media.bean.playerbean.MediaPlayer</B></PRE><HR><DL><DT>public class <B>MediaPlayer</B><DT>extends java.awt.Container<DT>implements <A HREF="../../../../javax/media/Player.html">Player</A>, java.io.Externalizable</DL><P><CODE>MediaPlayer</CODE> encapsulates a player in a    JavaBeans<sup><font size="-2">TM</sup></font> component.    <CODE>MediaPlayer</CODE> implements the <CODE>Player</CODE> and <CODE>Externalizable</CODE>    interfaces.   <p>   A <CODE>MediaPlayer</CODE> can be used as a    full-featured <CODE>Player</CODE> with either the default <CODE>Player</CODE> controls or   custom controls.   <h3><CODE>MediaPlayer</CODE> Properties</h3>   <p>   The following bean properties are supported by <CODE>MediaPlayer</CODE>:   <ul>   <li>loop: Indicates whether or not the media will be played repeatedly.       <li>media location: The location of the media to be played. The location can be either an       absolute address such as <CODE>http://xena/demo/media/Sample1.mov</CODE>       or an address relative to the codebase address such as <CODE>media/Sample1.mov</CODE>   <li>name: The name of this <CODE>MediaPlayer</CODE>.   <li>size and position: The size and position of this        <CODE>MediaPlayer</CODE>.   <li>volume: The audio volume as a number from 0 to 5, where  0 is muted    and 5 is the loudest possible volume. The default value is 3.          <li>show control panel: Indicates whether or not the video control panel is        displayed.   <li>show caching control: Indicates whether or not the caching control is displayed.       The caching control shows the download progress.             <li>fixed aspect ratio: Indicates whether or not the aspect ratio of the video         is maintained when the visual component is resized.   </ul> <p> Two additional properties can be set. These are not bean properties, but provide additional control over the presentation:  <ul> <li>ZoomLevel: Can be set through the popup menu and via set and get methods.     (Click the right mouse button over the media to bring up the popup menu.)    <li>MediaLocationVisible: Can be set through get and set methods. The media location  is not editable during runtime.  <h3>Invoking <CODE>MediaPlayer</CODE></h3> <p>   You can instantiate MediaPlayer directly or using a bean-enabled IDE tool such as NetObjects BeanBuilder. To instantiate <CODE>MediaPlayer</CODE> directly:  <pre>	      ClassLoader cl = this.getClass().getClassLoader();	      MediaPlayer pb = (MediaPlayer)Beans.instantiate(cl,		   			     "javax.media.bean.playerbean.MediaPlayer"); </pre><P><DL><DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#javax.media.bean.playerbean.MediaPlayer">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#curVolumeLevel">curVolumeLevel</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#curVolumeValue">curVolumeValue</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#curZoomLevel">curZoomLevel</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#curZoomValue">curZoomValue</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../javax/media/GainControl.html">GainControl</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#gainControl">gainControl</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../javax/media/Time.html">Time</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#mediaTime">mediaTime</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.Component</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>BOTTOM_ALIGNMENT,  CENTER_ALIGNMENT,  LEFT_ALIGNMENT,  RIGHT_ALIGNMENT,  TOP_ALIGNMENT</CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_javax.media.Controller"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.media.<A HREF="../../../../javax/media/Controller.html">Controller</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../javax/media/Controller.html#LATENCY_UNKNOWN">LATENCY_UNKNOWN</A>,  <A HREF="../../../../javax/media/Controller.html#Prefetched">Prefetched</A>,  <A HREF="../../../../javax/media/Controller.html#Prefetching">Prefetching</A>,  <A HREF="../../../../javax/media/Controller.html#Realized">Realized</A>,  <A HREF="../../../../javax/media/Controller.html#Realizing">Realizing</A>,  <A HREF="../../../../javax/media/Controller.html#Started">Started</A>,  <A HREF="../../../../javax/media/Controller.html#Unrealized">Unrealized</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_javax.media.Clock"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.media.<A HREF="../../../../javax/media/Clock.html">Clock</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../javax/media/Clock.html#RESET">RESET</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_javax.media.Duration"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface javax.media.<A HREF="../../../../javax/media/Duration.html">Duration</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../javax/media/Duration.html#DURATION_UNBOUNDED">DURATION_UNBOUNDED</A>,  <A HREF="../../../../javax/media/Duration.html#DURATION_UNKNOWN">DURATION_UNKNOWN</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#MediaPlayer()">MediaPlayer</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a MediaPlayer with its main panel preparing for    caching control events and the following visual display.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#addController(javax.media.Controller)">addController</A></B>(<A HREF="../../../../javax/media/Controller.html">Controller</A>&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells the <CODE>Player</CODE> to assume control of another <code>Controller</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#addControllerListener(javax.media.ControllerListener)">addControllerListener</A></B>(<A HREF="../../../../javax/media/ControllerListener.html">ControllerListener</A>&nbsp;listener)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies a <code>ControllerListener</code> to which this <code>Controller</code>  will send events.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#addPropertyChangeListener(java.beans.PropertyChangeListener)">addPropertyChangeListener</A></B>(java.beans.PropertyChangeListener&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a <CODE>PropertyChangeListener</CODE> to the listener list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#close()">close</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Releases all resources and cease all activity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#deallocate()">deallocate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aborts the current operation and cease any activity that consumes system resources.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../javax/media/Control.html">Control</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#getControl(java.lang.String)">getControl</A></B>(java.lang.String&nbsp;forName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>Control</code> that supports the specified  class or interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.awt.Component</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../javax/media/bean/playerbean/MediaPlayer.html#getControlPanelComponent()">getControlPanelComponent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <code>Component</code> that provides the default user

⌨️ 快捷键说明

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