-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
95 lines (84 loc) · 2.41 KB
/
index.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
declare module 'react-native-google-cast' {
import * as React from 'react'
import { EventEmitter, ViewProps } from 'react-native'
export type CastDevice = {
id: string
version: string
name: string
model: string
}
export type CastState =
| 'NoDevicesAvailable'
| 'NotConnected'
| 'Connecting'
| 'Connected'
export type CastOptions = {
mediaUrl: string
title?: string
subtitle?: string
studio?: string
imageUrl?: string
posterUrl?: string
contentType?: string
streamDuration?: number
playPosition?: number
isLive?: boolean
customData?: any
textTrackStyle?: TextTrackStyle
}
export type TextTrackStyle = {
backgroundColor?: string
edgeColor?: string
edgeType?: 'depressed' | 'dropShadow' | 'none' | 'outline' | 'raised'
fontFamily?: string
fontGenericFamily?:
| 'casual'
| 'cursive'
| 'monoSansSerif'
| 'monoSerif'
| 'sansSerif'
| 'serif'
| 'smallCaps'
fontScale?: number
fontStyle?: 'bold' | 'boldItalic' | 'italic' | 'normal'
foregroundColor?: string
windowColor?: string
windowCornerRadius?: number
windowType?: 'none' | 'normal' | 'rounded'
}
const GoogleCast: {
getCastDevice(): Promise<CastDevice>
getCastState(): Promise<CastState>
castMedia(options: CastOptions): void
endSession(stopCast?: boolean): Promise<boolean>
play(): void
pause(): void
stop(): void
seek(playPosition: number): void
launchExpandedControls(): void
showIntroductoryOverlay(): void
setVolume(volume: number): void
initChannel(channel: string): Promise<boolean>
sendMessage(message: string, namespace: string): Promise<boolean>
showCastPicker(): void
toggleSubtitles(enabled: boolean, languageCode?: string): Promise<void>
EventEmitter: EventEmitter
SESSION_STARTING: string
SESSION_STARTED: string
SESSION_START_FAILED: string
SESSION_SUSPENDED: string
SESSION_RESUMING: string
SESSION_RESUMED: string
SESSION_ENDING: string
SESSION_ENDED: string
MEDIA_STATUS_UPDATED: string
MEDIA_PLAYBACK_STARTED: string
MEDIA_PLAYBACK_ENDED: string
MEDIA_PROGRESS_UPDATED: string
CHANNEL_CONNECTED: string
CHANNEL_DISCONNECTED: string
CHANNEL_MESSAGE_RECEIVED: string
}
export default GoogleCast
export class CastButton extends React.Component<ViewProps> {}
}