1246 Java Media Framework and Java Sound (on (Make a web site)

1246 Java Media Framework and Java Sound (on CD) Chapter 22 Fig. 22.1 Playing media with interface Player(part 8 of 8) . A media clip must be processed before it is played. To process a media clip the program must access a media source, create a Controller for that source and output the media. Prior to output, users may perform optional formatting such as changing an AVI video to a QuickTime video. Although JMF hides low-level media processing (e.g. checking for file compatibility) from the programmer, both programmers and users can configure how a Player presents media. Section 22.3 and Section 22.4 reveal that capturing and streaming media follow the same guidelines. Section 22.8 lists several Web sites that have JMF-supported media contents. Figure 22.1 introduces some key objects for playing media. The JMF extension package javax.media imported in line 13 contains interface Player and other classes and interfaces needed for events. Line 18 declares a Playerobject to play media clips. Lines 30 31 declare the location of these clips as Fileand URLreferences. Lines 21 and 24 declare Component objects for the video display and for holding the controls. Component mediaControl enables users to play, pause and stop the media clip. ComponentvisualMedia displays the video portion of a media clip (if the media clip is a video). The JMF provides lightweight video renderers that are compatible with lightweight Swing components (See Chapter 13). Lines 107 108 in SimplePlayer s constructor specify that the Playershould draw its GUI components and video portion (if there
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply