# CutePlayer2 (Latest Successful FX Integration Testing)

Complex Cross-Component Test

The "CutePlayer2" itself was compiled with b46 but the applet/JNLP files were modified to download and use the latest successful FX integration build.

### 1. Standalone Execution

- Download the binary of CutePlayer2(CutePlayer2.jar).
- javafx -cp ./CutePlayer2.jar demos.players.CutePlayer2 [args.txt]
- It can take 1 optional argument, which is a file that contains test URIs. This will preload media files. If not given, you can still add more media at run time. Please see the below Quick User Guide for howto.

Here is a sample args.txt.

http://sqeweb.sfbay.sun.com/nfs/testbase/sqe/javafx/animation/GoodTime.avi
http://sqeweb.sfbay.sun.com/nfs/testbase/sqe/javafx/animation/coral.wmv
http://sqeweb.sfbay.sun.com/nfs/testbase/sqe/javafx/animation/song.mp3

### 2. Browser Execution

### Self-Signed Version:

- Applet Deployment (Full screen feature disabled) (Shift+Primary Mouse Button to drag it out)
- JNLP Deployment (Full screen feature enabled)

### UnSigned Version:

- Applet Deployment (Full screen feature disabled) (Shift+Primary Mouse Button to drag it out)
- JNLP Deployment (Full screen feature disabled)

### 3. Source Bundle

- CutePlayer2.zip (NB6.5 project)
- Latest: /java/sqe/testbase/sqe/javafx/animation/ws (Mercurial Repository): It's in this directory, usecases/CutePlayer2

### 4. Known Issues

- http://openjfx.java.sun.com/jira/browse/RT-1809: focus issue in option panels.

## Screen Shots & Quick User Guide

An option pane(Aspect Ratio) with the right side media library pane:

Black gackground(scroll mousewheel outside media window to change), zooming(scroll mousewheel inside media window to change), and the left side effect pane:

## Quick User Guide

### 1) Media Library Pane:

It's the blue gradient background window on the right side. It can be opened by moving the mouse to the right side of window. Press the white arrow button on the right edge to slide out.

Adding Media Files:

- If signed applet/JNLP, media files can be loaded from your file directory. Enter a media library root dir in the "Media Library Path".
- You can add single media file by using its URI into the "Media URI" (file://C:/[...]/video.wmv for example)
- You can remove a selected item by pressing a red X button on the top of the list box.

Single Play:

Select and double click a media from the media list box to play.

Batch Play:

You can play all media by pressing "Play All" button. This can be paused by "Pause/Run" toggle button. If you want to play for the given seconds per media, adjust the play time slider. You can set from 10s to 59s. The maximum value is used to play whole duration per media. You can press a circle icon on the top of the list box to play all indefinitely. The play time slider, "Pause/Run" toggle button and the indefinite circle button are only for the batch play.

### 2) Media Option Panes

These are the roll-up windows just on the top of the black control pane on bottom. Press the small blue/white button besides the "Play" button. Then the window will roll-up. You can navigate thru the following panes by using left/right arrow buttons.

- Audio Control
- Play Control
- Aspect Ratio
- Media Data
- Media Meta Data
- Media Tracks

Bottom Black Control Pane:

It contains standard controls such as

- A play/pause button.
- A progress bar with time information: Seeking works and you can jump by pressing a mouse button in the inner white progress bar.
- Full screen button.
- Volume control.

### 3) Misc

Zoom In/Out:

Scrolling the mousewheel inside the media window will zoom in/out the media view.

Changing the Backgound:

Scrolling the mousewheel outside the media window will change the background.

Full Screen Feature:

This can be enabled by pressing the full screen button on the bottom panel or double clicking the media view. This will make the bottom panel hidden. Move the mouse to the bottom to see the bottom controller. You can go back to the normal screen by pressing "ESC" key, double clicking the media view or pressing the full screen button again.

## Hosting CutePlayer2 to a Local Server

1) Get the source bundle from here (Not from the workspace. Only difference is "full screen is disabled" for browser tests).
2) From the root dir of the unzipped bundle, do the following to package.

Signed Versions:

    >javafxpackager -src . -appClass demos.players.CutePlayer2 -appWidth 800 -appHeight 600 -appCodebase http://[your_path]/latest/CutePlayer2 -sign -draggable -appVendor "Baechul Kim" -appName CutePlayer2

Unsigned Versions:

    >javafxpackager -src . -appClass demos.players.CutePlayer2 -appWidth 800 -appHeight 600 -appCodebase http://[your_path]/latest/CutePlayer2/Unsigned -draggable -appVendor "Baechul Kim" -appName CutePlayer2

3) Open all html/jnlp files that generated by the javafxpackager tool.
4) Modify the URL of FX build. In SWAN, the latest is at

http://jfx.sfbay.sun.com/hudson/job/javafx1.0-integration/label=windows-i586/lastSuccessfulBuild/artifact/build/windows-i586/release/javaws

If you have a mirror in your local, use yours instead.

( For standalone version, please see the above "Source Bundle" to download or clone. THen you can build from the NetBean6.5.)

Baechul Kim
bae-chul.kim@sun.com for comments and questions