Skip to content

Commit

Permalink
Fix missing type of playbackRate for MediaStatus.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiankunatpushpay committed Mar 3, 2021
1 parent 06d4b19 commit 44cb010
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 6 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ declare module 'react-native-google-cast' {
}

export type MediaStatus = {
streamDuration: number,
streamPosition: number,
playerState: number,
idleReason: number,
muted: boolean,
streamDuration: number
streamPosition: number
playerState: number
idleReason: number
muted: boolean
playbackRate: number
}

export type TextTrackStyle = {
Expand Down
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type MediaStatus = {
playerState: number,
idleReason: number,
muted: boolean,
playbackRate: number,
}

type TextTrackStyle = {
Expand Down Expand Up @@ -60,14 +61,14 @@ export default {
},
getCastState(): Promise<CastState> {
return GoogleCast.getCastState().then(
state =>
(state) =>
['NoDevicesAvailable', 'NotConnected', 'Connecting', 'Connected'][
state
],
)
},
getMediaStatus(): Promise<MediaStatus> {
return GoogleCast.getMediaStatus();
return GoogleCast.getMediaStatus()
},
castMedia(params: {
mediaUrl: string,
Expand All @@ -92,7 +93,7 @@ export default {
subtitle?: string,
customData?: Object,
}> {
return GoogleCast.getCurrentMedia();
return GoogleCast.getCurrentMedia()
},

/**
Expand Down Expand Up @@ -142,7 +143,7 @@ export default {
sendMessage(namespace: string, message: string) {
return GoogleCast.sendMessage(message, namespace)
},
showCastPicker(){
showCastPicker() {
GoogleCast.showCastPicker()
},

Expand Down

0 comments on commit 44cb010

Please sign in to comment.