-
Notifications
You must be signed in to change notification settings - Fork 0
/
CastButton.js
39 lines (38 loc) · 1.58 KB
/
CastButton.js
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
import React from 'react';
import { requireNativeComponent } from 'react-native';
/**
* Button that presents the Cast icon.
*
* By default, upon pressing the button it opens the native Cast dialog.
*
* @see [GCKUICastButton](https://developers.google.com/cast/docs/reference/ios/interface_g_c_k_u_i_cast_button) (iOS)
* @see [CastButtonFactory](https://developers.google.com/android/reference/com/google/android/gms/cast/framework/CastButtonFactory) & [MediaRouteButton](https://developer.android.com/reference/android/support/v7/app/MediaRouteButton.html) (Android)
*/
export default function CastButton(props) {
// @ts-ignore FIXME
return /*#__PURE__*/React.createElement(GoogleCastButton, props);
}
CastButton.propTypes = {
/**
* A flag that indicates whether a touch event on this button will trigger the display of the Cast dialog that is provided by the framework.
*
* By default this property is set to YES. If an application wishes to handle touch events itself, it should set the property to NO and register an appropriate target and action for the touch event.
*/
// triggersDefaultCastDialog: PropTypes.bool
// accessibilityLabel: PropTypes.string
};
const GoogleCastButton = requireNativeComponent('RNGoogleCastButton' // CastButton
// {
// nativeOnly: {
// accessibilityLabel: true,
// accessibilityLiveRegion: true,
// accessibilityComponentType: true,
// testID: true,
// nativeID: true,
// importantForAccessibility: true,
// renderToHardwareTextureAndroid: true,
// onLayout: true,
// },
// }
);
//# sourceMappingURL=CastButton.js.map