Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
{}
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
useExternalPlaybackAvailability,
useAvAudioSessionRoutes,
} from "react-airplay";
import { Button, Text} from "react-native"
import { Button, Text, View } from "react-native";

export function App() {
const isAirplayConnected = useAirplayConnectivity();
Expand All @@ -32,24 +32,31 @@ export function App() {
return (
<View>
{isExternalPlaybackAvailable && (
<AirplayButton
prioritizesVideoDevices
tintColor="red"
activeTintColor="blue"
style={{
width: 24,
height: 24,
}}
/>

<Button title="Custom Button" onPress={() => showRoutePicker({prioritizesVideoDevices: true})}/>
<>
<AirplayButton
prioritizesVideoDevices
tintColor="red"
activeTintColor="blue"
style={{
width: 24,
height: 24,
}}
/>
<Button
title="Custom Button"
onPress={() => showRoutePicker({ prioritizesVideoDevices: true })}
/>
</>
)}
{routes.length && (
<Text>Currently playing on {routes.map((route) => route.portName).join(", "")}</Text>
{routes.length > 0 && (
<Text>
Currently playing on{" "}
{routes.map((route) => route.portName).join(", ")}
</Text>
)}
</View>
);
};
}
```

### Note
Expand Down
Loading