Adding media components
With media components, you can create Web pages that play various kinds of media files.
Depending on the media you want to use, you can choose from among the following Faces media components:
- Generic A/V Player - creates a media player on the Web page and plays a file.
- Macromedia Flash Player - creates an instance of the Macromedia Flash Player in order to plays Flash files on the Web page.
- Microsoft Windows Media Player - creates an instance of the Microsoft Windows Media Player in order to play media files on the Web page.
- Macromedia Shockwave Player - plays Macromedia Shockwave Player files on the Web page.
- Real Network RealOne Player - plays Real Network RealOne Player files on the Web page. These files can be either audio or video files.
Not all of these media components are usually visible in the Faces Components drawer on the palette. To display a media component in the Faces Components drawer, right-click within the palette and choose Customize. The Customize Palette dialog opens. In the left window of the dialog, select a media component in the Faces Components drawer. In the right window of the dialog, clear the Hide field and click OK.
To create a media component on a Faces JSP file:
- Drag a Media Player component from the Faces Components drawer on the palette to the Faces JSP file. The Select Type dialog opens. (Note that if you drag another type of media component to the Faces JSP file, this dialog does not open.)
- Select a media component in the dialog (in this case, select Generic Player) and click OK.
- In the Properties view for the Media Player:
- You can enter a file name in the File field or you can click the icon next to the File field. If you click the icon, you can then browse for a local file to play in the media player, you can import a file to play in the media player, or you can bind a file to the media player component.
- Set other attributes for the media player, such as type, height, width, alignment, and style.
- You may also want to click the All Attributes icon, located to the right of the Properties view title bar. The All Attributes view contains additional attributes not listed in the Properties view for the media component. For example, you can turn on autostart for RealPlayer in the All Attributes view.
Note that these steps will vary, depending on the media component you are creating.
Related concepts
JavaServer Faces
Related tasks
Creating Faces applications - overview
Creating a Faces JSP file
Related reference
Faces components reference
Attributes for Faces components