外出路线选择视图
iOS/tvOS 只为 AVRoutePickerView (AirPlay 设备的选择器) 执行本地包装器
示例
(另见 实例 这回贷.
import { Pressable, StyleSheet, Text, View } from 'react-native';
import { ExpoAvRoutePickerView } from 'expo-av-route-picker-view';
export default function App() {
return (
<View style={styles.container}>
<Pressable onPress={() => {}}>
{({ pressed, focused }) => {
return (
<View style={{ opacity: focused || pressed ? 0.6 : 1.0 }}>
<Text>Here is the route picker!</Text>
</View>
);
}}
</Pressable>
<ExpoAvRoutePickerView
style={styles.picker}
tintColor="#000000"
activeTintColor="#0000FF"
prioritizesVideoDevices
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
picker: {
width: 100,
height: 100,
},
});
在管理下的博览会项目安装
对于 管理 展览项目,请遵照 最近稳定发行的API文档。如果跟随链接,而且没有可用的文件,那么这个库在管理的项目中还无法使用——它很可能被包括在即将到来的世博会SDK发布中.
在赤裸反应原生项目中安装
对于赤裸反射原住民项目,您必须确保您有 安装和配置 expo 软件包 在继续之前.
将软件包添加到您的 npm 依赖性
npm install expo-av-route-picker-view
IOS 配置
运行 npx pod-install 在安装 npm 包后.
捐款
贡献是非常受欢迎的! 请参阅本报告所述准则 贡献指南。 。 。 .