Web file server - 1248 Java Media Framework and Java Sound (on

1248 Java Media Framework and Java Sound (on CD) Chapter 22 completes realizing, it generates a RealizeCompleteEvent a type of ControllerEvent that occurs when a Player completes its transition to state Realized. This state indicates that the Playerhas completed all preparations needed to start processing the media. The program invokes method realizeComplete (lines 228 232) when Player generates a RealizeCompleteEvent. Most media players have a buffering feature, which stores a portion of downloaded media locally so that users do not have to wait for an entire clip to download before playing it, as reading media data can take a long time. By invoking Player method prefetch, line 231 transitions the player to the Prefetching state. When a Player prefetches a media clip, the Playerobtains exclusive control over certain system resources needed to play the clip. The Playeralso begins buffering media data to reduce the delay before the media clip plays. When the Player completes prefetching, it transitions to state Prefetched and is ready to play media. During this transition, the Player generates a ControllerEvent of type PrefetchCompleteEvent to indicate that it is ready to display media. The Player invokes PlayerEventHandler method prefetchComplete (lines 235 246), which displays the Player s GUI in the frame. After obtaining the hardware resources, the program can get the media components it requires. Line 238 invokes method getMediaComponents (lines 206 222) to obtain the GUI s controls and the media s visual component (if the media is a video clip) and attach them to the application window s content pane. Player method getVisualComponent (line 209) obtains the visual component of the video clip. Similarly, line 216 invokes Player method getControl- PanelComponentto return the GUI s controls. The GUI (Fig. 22.1) typically provides the following controls: 1. A positioning slider to jump to certain points in the media clip. 2. A pause button. 3. A volume button that provides volume control by right clicking and a mute function by left clicking. 4. A media properties button that provides detailed media information by right clicking and frame rate control by left clicking. Look-and-Feel Observation 22.1 Invoking Playermethod getVisualComponentyields null for audio files, because there is no visual component to display. Look-and-Feel Observation 22.2 Invoking Player method getControlPanelComponent yields different sets of GUI controls depending on the media type. For example, media content streamed directly from a live conference does not have a progress bar because the length of the media is not pre-determined. After validating the new frame layout (line 241), line 244 invokes Player method start (line 239) to start playing the media clip. Software Engineering Observation 22.1 If the Player has not prefetched or realized the media, invoking Player method start prefetches and realizes the media.
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Leave a Reply