Skip to content

Commit

Permalink
fix cast dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius456 committed Mar 15, 2024
1 parent 8d32821 commit c814be5
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/app-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"react-native-photo-editor": "1.0.13",
"react-native-splash-screen": "3.3.0",
"react-native-tvos": "0.73.1-3",
"react-native-web": "0.19.9"
"react-native-web": "0.19.9",
"react-native-google-cast": "4.6.0"
},
"devDependencies": {
"@flexn/assets-renative-outline": "0.3.3",
Expand Down
5 changes: 5 additions & 0 deletions packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@
"android": {
"implementation": "// TEST"
}
},
"react-native-google-cast": {
"android": {
"implementation": "// TEST"
}
}
},

Expand Down
4 changes: 2 additions & 2 deletions packages/app-harness/src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import styles from '../styles';
import { addNotificationListeners, removeNotificationListeners } from '../components/Notifications';
import { requestPermissions } from '../components/Permissions';
import { TestCase } from '../components/TestCase';
import { CastButton } from '../components/CastButton';
import { CastComponent } from '../components/CastButton';

const App = () => {
const [showVideo, setShowVideo] = useState(false);
Expand Down Expand Up @@ -79,7 +79,7 @@ const App = () => {
<Image source={ICON_LOGO} style={{ width: 100, height: 100 }} />
</TestCase>
<TestCase id={6} title="Cast Support">
<CastButton />
<CastComponent />
</TestCase>
</ScrollView>
</View>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
import { CastButton } from 'react-native-google-cast';
import React from 'react';
import { CastButton, useRemoteMediaClient } from 'react-native-google-cast';

export { CastButton };
export function CastComponent() {
const client = useRemoteMediaClient();

if (client) {
client.loadMedia({
mediaInfo: {
contentUrl: 'http://localhost:8095',
},
});
}

return <CastButton style={{ width: 24, height: 24, tintColor: 'black' }} />;
}
2 changes: 1 addition & 1 deletion packages/app-harness/src/components/CastButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Text } from 'react-native';

export const CastButton = () => {
export const CastComponent = () => {
return <Text>Not supported</Text>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
{
"tag": "activity",
"android:name": "com.facebook.react.devsupport.DevSettingsActivity"
},
{
"tag": "meta-data",
"android:name": "com.google.android.gms.cast.framework.OPTIONS_PROVIDER_CLASS_NAME",
"android:value": "com.reactnative.googlecast.GoogleCastOptionsProvider"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17935,10 +17935,10 @@ [email protected]:
lodash "^4.17.21"
prop-types "^15.7.2"

react-native-google-cast@4.8.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/react-native-google-cast/-/react-native-google-cast-4.8.0.tgz#7af427bc8a44d1da62e6d2238c3c74136d098297"
integrity sha512-1BjHueIWO5NvR9VjJLeB8SvC8cidTJaZopztI8KbBc64GIiF9jWcfoV/MGK+IRsBZ9E8mDJ2syJmS+AAqgWiEA==
react-native-google-cast@4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/react-native-google-cast/-/react-native-google-cast-4.6.0.tgz#5b8e8e8424a9fe5873d48299cc04ff04b377d1ef"
integrity sha512-YZP2muHAq0XtfwldJ4ztSPq51n1mEUoGfz5n/jUyg9hTRsawyOC+1wedzL1lVwJvCuspPEyl631v90/2S8BJFg==

[email protected]:
version "1.5.0"
Expand Down

0 comments on commit c814be5

Please sign in to comment.