1import React from 'react'; 2import {Image, StyleSheet, Text, View} from 'react-native'; 3import rpx from '@/utils/rpx'; 4import MusicQueue from '@/core/musicQueue'; 5 6interface IBackgroundProps {} 7export default function Background(props: IBackgroundProps) { 8 const musicItem = MusicQueue.useCurrentMusicItem(); 9 return ( 10 <> 11 {musicItem?.artwork && ( 12 <Image 13 style={style.blur} 14 blurRadius={15} 15 source={{ 16 uri: musicItem.artwork, 17 }}></Image> 18 )} 19 </> 20 ); 21} 22 23const style = StyleSheet.create({ 24 blur: { 25 width: '100%', 26 height: '100%', 27 position: 'absolute', 28 top: 0, 29 left: 0, 30 right: 0, 31 bottom: 0, 32 opacity: 0.6, 33 }, 34}); 35