forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
react-swf.d.ts
137 lines (132 loc) · 9.97 KB
/
react-swf.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Type definitions for react-swf
// Project: https://github.com/syranide/react-swf
// Definitions by: Stepan Mikhaylyuk <https://github.com/stepancar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../react/react.d.ts"/>
declare module "react-swf" {
export = ReactSWF;
}
declare var ReactSWF: typeof rswf.ReactSWF
declare module rswf {
interface State {
}
interface Props {
/**
* Specifies the source location (URL) of the SWF file to load.
*/
src: string;
/**
* Identifies the location of the Flash Player plug-in so that the user can download it if it is not already installed.
*/
pluginspage?:string
/**
* Specifies the width of the SWF content in either pixels or percentage of browser window.
*/
width?: number;
/**
* Specifies the height of the SWF content in either pixels or percentage of browser window.
*/
height?: number;
/**
* (attribute for OBJECT tag) and name (attribute for EMBED tag) - SWF file identifier. Identifies the SWF file to the web browser, allowing browser scripting languages (for example, JavaScript) to reference the SWF content. For cross-browser compatibility, make sure that the id and name are set to the same value.
*/
id?: string;
/**
* Specifies whether a timeline-based SWF file begins playing immediately on loading in the browser. If this attribute is omitted, the default value is true.
*/
play?: boolean;
/**
* Specifies whether a timeline-based SWF file repeats indefinitely or stops when it reaches the last frame. If this attribute is omitted, the default value is true.
*/
loop?: boolean;
/**
* Specifies if movie playback controls are available in the Flash Player context menu.
* true displays a full menu that provides expanded movie playback controls (for example, Zoom, Quality, Play, Loop, Rewind, Forward, Back).
* false displays a menu that hides movie playback controls (for example, Zoom, Quality, Play, Loop, Rewind, Forward, Back). This attribute is useful for SWF content that does not rely on the Timeline, such as content controlled entirely by ActionScript. The short menu includes "Settings" and "About Flash Player" menu items.
*/
menu?: boolean;
/**
* Possible values: low, autolow, autohigh, medium, high, best. Specifies the display list Stage rendering quality. Setting the Stage.quality property via ActionScript overrides this value.
* low favors playback speed over appearance and never uses anti-aliasing.
* autolow emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If Flash Player detects that the processor can handle it, anti-aliasing is turned on.
* autohigh emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the View > Antialias setting in Flash Professional.
* medium applies some anti-aliasing and does not smooth bitmaps. It produces a better quality than the Low setting, but lower quality than the High setting.
* high favors appearance over playback speed and always applies anti-aliasing. If the movie does not contain animation, bitmaps are smoothed; if the movie has animation, bitmaps are not smoothed.
* best provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.
*/
quality?: string;
/**
* Possible values: showall, noborder, exactfit, noscale. Specifies how Flash Player scales SWF content to fit the pixel area specified by the OBJECT or EMBED tag.
* default (Show all) makes the entire SWF file visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders can appear on two sides of the movie.
* noborder scales the SWF file to fill the specified area, while maintaining the original aspect ratio of the file. Flash Player can crop the content, but no distortion occurs.
* exactfit makes the entire SWF file visible in the specified area without trying to preserve the original aspect ratio. Distortion can occur.
* noscale prevents the SWF file from scaling to fit the area of the OBJECT or EMBED tag. Cropping can occur.
*/
scale?: string;
/**
* (attribute for Object) - Possible values: l, t, r.
* Default centers the movie in the browser window and crops edges if the browser window is smaller than the movie.
* l (left), r (right), and t (top) align the movie along the corresponding edge of the browser window and crop the remaining three sides as needed.
*/
align?: string;
/**
* Possible values: l, t, r, tl, tr.
* l, r, and t align the movie along the left, right, or top edge of the browser window and crop the remaining sides as needed.
* tl and tr align the movie to the upper-left and top upper-corner of the browser window and crop the bottom and remaining side as necessary.
*/
salign?: string;
/**
* Possible values: window, direct, opaque, transparent, gpu. Sets the Window Mode property of the SWF file for transparency, layering, positioning, and rendering in the browser. If this attribute is omitted, the default value is "window". For more information, see Using Window Mode (wmode) values below.
* window - The SWF content plays in its own rectangle ("window") on a web page. The browser determines how the SWF content is layered against other HTML elements. With this value, you cannot explicitly specify if SWF content appears above or below other HTML elements on the page.
* direct - Use direct to path rendering. This attribute bypasses compositing in the screen buffer and renders the SWF content directly to the screen. This wmode value is recommended to provide the best performance for content playback. It enables hardware accelerated presentation of SWF content that uses Stage Video or Stage 3D.
* opaque - The SWF content is layered together with other HTML elements on the page. The SWF file is opaque and hides everything layered behind it on the page. This option reduces playback performance compared to wmode=window or wmode=direct.
* transparent - The SWF content is layered together with other HTML elements on the page. The SWF file background color (Stage color) is transparent. HTML elements beneath the SWF file are visible through any transparent areas of the SWF, with alpha blending. This option reduces playback performance compared to wmode=window or wmode=direct.
* gpu - Use additional hardware acceleration on some Internet-connected TVs and mobile devices. In contrast to other wmode values, pixel fidelity for display list graphics is not guaranteed. Otherwise, this value is similar to wmode=direct.
*/
wmode?: string;
/**
* [hexadecimal RGB value] in the format #RRGGBB. Specifies the background color of the SWF content. Use this attribute to override the background color (Stage color) setting specified in the SWF file. (This attribute does not affect the background color of the HTML page.)
*/
bgcolor?: string;
/**
* [base directory] or [URL]. Specifies the base directory or URL used to resolve all relative path statements in the SWF file. This attribute is helpful when your SWF file is kept in a different directory from your other files.
*/
base?: string;
/**
* Setting this value to true allows the SWF file to enter full screen mode via ActionScript. For more information, see Exploring full screen mode in Flash Player. If this attribute is omitted, the default value is false.
*/
allowFullScreen?: boolean;
/**
* Possible values: portrait or landscape. Used to control how full screen SWF content appears on mobile devices that support automatic screen rotation, such as phones and tablets. If this attribute is specified, Flash Player uses the specified screen orientation (portrait or landscape) when the SWF is viewed in full screen mode. It doesn't matter how the device is oriented. If this attribute is not specified, orientation of content in full screen mode follows the screen orientation used by the browser.
*/
fullScreenAspectRatio?: string;
/**
* Variables, defined as a string of key=value pairs, that are passed to the SWF file.
* Use flashvars to specify root-level variables in the SWF file. The format of the string is a set of key=value combinations separated by the '&' character.
* Browsers support string sizes of up to 64 KB (65535 bytes) in length.
* For more information on using flashvars, see Using FlashVars to pass variables to a SWF (tn_16417).
*/
flashvars?: Object | string
}
export class ReactSWF extends __React.Component<Props, State>{
render(): __React.DOMElement<any>
/**
* Returns the Flash Player object DOM node.
* Should be prefered over `React.findDOMNode`.
* @return {?DOMNode} Flash Player object DOM node.
*/
getFPDOMNode(): Node
/**
* Returns installed Flash Player version. Result is cached.
* Must not be called in a non-browser environment.
* @return {?string} 'X.Y.Z'-version or null.
*/
static getFPVersion(): string
/**
* Returns if installed Flash Player meets version requirement.
* Must not be called in a non-browser environment.
* @return {boolean} true if supported
*/
static isFPVersionSupported(versionString: string): boolean
}
}