Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.MediaSettings Class Reference

## Public Member Functions
| MediaSettings ()
| Constructor.
| MediaSettings (boolean auto_play, String base_url, long bg_color, float bg_opacity, int duration, int page, int repeat, boolean show_ui, boolean is_visible, int volume, int window_type, FloatingInfo floating_wnd_info)
| Constructor, with parameters. More...
| MediaSettings (MediaSettings media_settings)
| Constructor, with another media settings object. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. More...
boolean | getAuto_play ()
| Get specify whether the media clip should begin playing automatically after the player is opened. More...
String | getBase_url ()
| Get the base URL to be used to resolve any relative URLs used in the media clip. More...
long | getBg_color ()
| Get the background color for the media player window. More...
float | getBg_opacity ()
| Get the background opacity for the media player window. More...
int | getDuration ()
| Get the amount of time in seconds that playback will take. More...
FloatingInfo | getFloating_wnd_info ()
| Get a FloatingInfo containing properties (listed below) that define the location and style of a floating window. More...
boolean | getIs_visible ()
| Get a boolean value that specifies whether the player should be visible. More...
int | getPage ()
| Get for a docked media player, this property is the number of the page on which the player should be docked. More...
int | getRepeat ()
| Get the number of times the media playback should automatically repeat. More...
boolean | getShow_ui ()
| Get a boolean value that specifies whether the controls of the media player should be visible or not. More...
int | getVolume ()
| Get specify the playback volume. More...
int | getWindow_type ()
| Get that defines which type of window the media player should be created in. More...
void | set (boolean auto_play, String base_url, long bg_color, float bg_opacity, int duration, int page, int repeat, boolean show_ui, boolean is_visible, int volume, int window_type, FloatingInfo floating_wnd_info)
| Set values. More...
void | setAuto_play (boolean value)
| Set specify whether the media clip should begin playing automatically after the player is opened. More...
void | setBase_url (String value)
| Set the base URL to be used to resolve any relative URLs used in the media clip. More...
void | setBg_color (long value)
| Set the background color for the media player window. More...
void | setBg_opacity (float value)
| Set the background opacity for the media player window. More...
void | setDuration (int value)
| Set the amount of time in seconds that playback will take. More...
void | setFloating_wnd_info (FloatingInfo value)
| Set a FloatingInfo containing properties (listed below) that define the location and style of a floating window. More...
void | setIs_visible (boolean value)
| Set a boolean value that specifies whether the player should be visible. More...
void | setPage (int value)
| Set for a docked media player, this property is the number of the page on which the player should be docked. More...
void | setRepeat (int value)
| Set the number of times the media playback should automatically repeat. More...
void | setShow_ui (boolean value)
| Set a boolean value that specifies whether the controls of the media player should be visible or not. More...
void | setVolume (int value)
| Set specify the playback volume. More...
void | setWindow_type (int value)
| Set that defines which type of window the media player should be created in. More...

## Static Public Attributes
static final int | e_PlayerWindowTypeDockedPage = 1
| Window type: a docked page window.
static final int | e_PlayerWindowTypeFloating = 2
| Window type: a floating window.
static final int | e_PlayerWindowTypeFullScreen = 4
| Window type: a full-screen window that obscures all other windows.

## Detailed Description

This class represents media settings.

## Constructor & Destructor Documentation

## ◆ MediaSettings() [1/2]

com.foxit.sdk.MediaSettings.MediaSettings | ( | boolean | auto_play,
|  | String | base_url,
|  | long | bg_color,
|  | float | bg_opacity,
|  | int | duration,
|  | int | page,
|  | int | repeat,
|  | boolean | show_ui,
|  | boolean | is_visible,
|  | int | volume,
|  | int | window_type,
|  | FloatingInfo | floating_wnd_info
| ) |  |

Constructor, with parameters.

Parameters

  [in] | auto_play | Specify whether the media clip should begin playing automatically after the player is opened.
  [in] | base_url | The base URL to be used to resolve any relative URLs used in the media clip.
  [in] | bg_color | The background color for the media player window.
  [in] | bg_opacity | The background opacity for the media player window.
  [in] | duration | The amount of time in seconds that playback will take.
  [in] | page | The number of the page on which the player should be docked.
  [in] | repeat | The number of times the media playback should automatically repeat.
  [in] | show_ui | A boolean value that specifies whether the controls of the media player should be visible or not.
  [in] | is_visible | A boolean value that specifies whether the player should be visible.
  [in] | volume | Specify the playback volume. A value of 0 is muted, a value of 100 is normal (full) volume.
  [in] | window_type | That defines which type of window the media player should be created in.
  [in] | floating_wnd_info | A FloatingInfo object containing properties (listed below) that define the location and style of a floating window.

## ◆ MediaSettings() [2/2]

com.foxit.sdk.MediaSettings.MediaSettings | ( | MediaSettings | media_settings | ) |

Constructor, with another media settings object.

Parameters

  [in] | media_settings | Another media settings object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.MediaSettings.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ getAuto_play()

com.foxit.sdk.MediaSettings.getAuto_play | ( |  | ) |

Get specify whether the media clip should begin playing automatically after the player is opened.

true means auto play, while false means not.

Returns
  Specify whether the media clip should begin playing automatically after the player is opened.

## ◆ getBase_url()

com.foxit.sdk.MediaSettings.getBase_url | ( |  | ) |

Get the base URL to be used to resolve any relative URLs used in the media clip.

For example, if the media opens a web page. There is no default value; if this is not specified, the interpretation of a relative URL will vary depending the media player, but in most cases will not work.

Returns
  The base URL to be used to resolve any relative URLs used in the media clip.

## ◆ getBg_color()

com.foxit.sdk.MediaSettings.getBg_color | ( |  | ) |

Get the background color for the media player window.

Returns
  The background color for the media player window. Format: 0xRRGGBB.

## ◆ getBg_opacity()

com.foxit.sdk.MediaSettings.getBg_opacity | ( |  | ) |

Get the background opacity for the media player window.

Returns
  The background opacity for the media player window.

## ◆ getDuration()

com.foxit.sdk.MediaSettings.getDuration | ( |  | ) |

Get the amount of time in seconds that playback will take.

Returns
  The amount of time in seconds that playback will take.

## ◆ getFloating_wnd_info()

com.foxit.sdk.MediaSettings.getFloating_wnd_info | ( |  | ) |

Get a FloatingInfo containing properties (listed below) that define the location and style of a floating window.

Returns
  A FloatingInfo containing properties (listed below) that define the location and style of a floating window.

## ◆ getIs_visible()

com.foxit.sdk.MediaSettings.getIs_visible | ( |  | ) |

Get a boolean value that specifies whether the player should be visible.

Returns
  A boolean value that specifies whether the player should be visible.

## ◆ getPage()

com.foxit.sdk.MediaSettings.getPage | ( |  | ) |

Get for a docked media player, this property is the number of the page on which the player should be docked.

Returns
  For a docked media player, this property is the number of the page on which the player should be docked. For other types of media players, this property is ignored.

## ◆ getRepeat()

com.foxit.sdk.MediaSettings.getRepeat | ( |  | ) |

Get the number of times the media playback should automatically repeat.

The default value of 1 causes the media to be played once.

Returns
  The number of times the media playback should automatically repeat.

## ◆ getShow_ui()

com.foxit.sdk.MediaSettings.getShow_ui | ( |  | ) |

Get a boolean value that specifies whether the controls of the media player should be visible or not.

Returns
  A boolean value that specifies whether the controls of the media player should be visible or not.

## ◆ getVolume()

com.foxit.sdk.MediaSettings.getVolume | ( |  | ) |

Get specify the playback volume.

Returns
  Specify the playback volume. A value of 0 is muted, a value of 100 is normal (full) volume.

## ◆ getWindow_type()

com.foxit.sdk.MediaSettings.getWindow_type | ( |  | ) |

Get that defines which type of window the media player should be created in.

Returns
  That defines which type of window the media player should be created in. Please refer to values starting from com.foxit.sdk.MediaSettings.e_PlayerWindowTypeDockedPage and this should be one of these values.

## ◆ set()

void com.foxit.sdk.MediaSettings.set | ( | boolean | auto_play,
|  | String | base_url,
|  | long | bg_color,
|  | float | bg_opacity,
|  | int | duration,
|  | int | page,
|  | int | repeat,
|  | boolean | show_ui,
|  | boolean | is_visible,
|  | int | volume,
|  | int | window_type,
|  | FloatingInfo | floating_wnd_info
| ) |  |

Set values.

Parameters

  [in] | auto_play | Specify whether the media clip should begin playing automatically after the player is opened.
  [in] | base_url | The base URL to be used to resolve any relative URLs used in the media clip.
  [in] | bg_color | The background color for the media player window.
  [in] | bg_opacity | The background opacity for the media player window.
  [in] | duration | The amount of time in seconds that playback will take.
  [in] | page | The number of the page on which the player should be docked.
  [in] | repeat | The number of times the media playback should automatically repeat.
  [in] | show_ui | A boolean value that specifies whether the controls of the media player should be visible or not.
  [in] | is_visible | A boolean value that specifies whether the player should be visible.
  [in] | volume | Specify the playback volume. A value of 0 is muted, a value of 100 is normal (full) volume.
  [in] | window_type | That defines which type of window the media player should be created in.
  [in] | floating_wnd_info | A FloatingInfo object containing properties (listed below) that define the location and style of a floating window.

Returns
  None.

## ◆ setAuto_play()

com.foxit.sdk.MediaSettings.setAuto_play | ( | boolean | value | ) |

Set specify whether the media clip should begin playing automatically after the player is opened.

true means auto play, while false means not.

Parameters

  [in] | value | Specify whether the media clip should begin playing automatically after the player is opened.

Returns
  None.

## ◆ setBase_url()

com.foxit.sdk.MediaSettings.setBase_url | ( | String | value | ) |

Set the base URL to be used to resolve any relative URLs used in the media clip.

For example, if the media opens a web page. There is no default value; if this is not specified, the interpretation of a relative URL will vary depending the media player, but in most cases will not work.

Parameters

  [in] | value | The base URL to be used to resolve any relative URLs used in the media clip.

Returns
  None.

## ◆ setBg_color()

com.foxit.sdk.MediaSettings.setBg_color | ( | long | value | ) |

Set the background color for the media player window.

Parameters

  [in] | value | The background color for the media player window. Format: 0xRRGGBB.

Returns
  None.

## ◆ setBg_opacity()

com.foxit.sdk.MediaSettings.setBg_opacity | ( | float | value | ) |

Set the background opacity for the media player window.

Parameters

  [in] | value | The background opacity for the media player window.

Returns
  None.

## ◆ setDuration()

com.foxit.sdk.MediaSettings.setDuration | ( | int | value | ) |

Set the amount of time in seconds that playback will take.

Parameters

  [in] | value | The amount of time in seconds that playback will take.

Returns
  None.

## ◆ setFloating_wnd_info()

com.foxit.sdk.MediaSettings.setFloating_wnd_info | ( | FloatingInfo | value | ) |

Set a FloatingInfo containing properties (listed below) that define the location and style of a floating window.

Parameters

  [in] | value | A FloatingInfo containing properties (listed below) that define the location and style of a floating window.

Returns
  None.

## ◆ setIs_visible()

com.foxit.sdk.MediaSettings.setIs_visible | ( | boolean | value | ) |

Set a boolean value that specifies whether the player should be visible.

Parameters

  [in] | value | A boolean value that specifies whether the player should be visible.

Returns
  None.

## ◆ setPage()

com.foxit.sdk.MediaSettings.setPage | ( | int | value | ) |

Set for a docked media player, this property is the number of the page on which the player should be docked.

Parameters

  [in] | value | For a docked media player, this property is the number of the page on which the player should be docked. For other types of media players, this property is ignored.

Returns
  None.

## ◆ setRepeat()

com.foxit.sdk.MediaSettings.setRepeat | ( | int | value | ) |

Set the number of times the media playback should automatically repeat.

The default value of 1 causes the media to be played once.

Parameters

  [in] | value | The number of times the media playback should automatically repeat.

Returns
  None.

## ◆ setShow_ui()

com.foxit.sdk.MediaSettings.setShow_ui | ( | boolean | value | ) |

Set a boolean value that specifies whether the controls of the media player should be visible or not.

Parameters

  [in] | value | A boolean value that specifies whether the controls of the media player should be visible or not.

Returns
  None.

## ◆ setVolume()

com.foxit.sdk.MediaSettings.setVolume | ( | int | value | ) |

Set specify the playback volume.

Parameters

  [in] | value | Specify the playback volume. A value of 0 is muted, a value of 100 is normal (full) volume.

Returns
  None.

## ◆ setWindow_type()

com.foxit.sdk.MediaSettings.setWindow_type | ( | int | value | ) |

Set that defines which type of window the media player should be created in.

Parameters

  [in] | value | That defines which type of window the media player should be created in. Please refer to values starting from com.foxit.sdk.MediaSettings.e_PlayerWindowTypeDockedPage and this should be one of these values.

Returns
  None.