61 lines
1.8 KiB
TypeScript
61 lines
1.8 KiB
TypeScript
import { View, StyleSheet, Dimensions } from 'react-native'
|
|
import { Skeleton } from './skeleton'
|
|
|
|
const { width: screenWidth, height: screenHeight } = Dimensions.get('window')
|
|
const TAB_BAR_HEIGHT = 83
|
|
const videoHeight = screenHeight - TAB_BAR_HEIGHT
|
|
|
|
export function VideoSkeleton() {
|
|
return (
|
|
<View style={styles.container}>
|
|
<View style={[styles.videoContainer, { height: videoHeight }]}>
|
|
{/* 主视频区域骨架 */}
|
|
<Skeleton width={screenWidth} height={videoHeight} borderRadius={0} />
|
|
|
|
{/* 左下角按钮骨架 */}
|
|
<View style={styles.actionButtonLeft}>
|
|
<Skeleton width={16} height={16} borderRadius={4} />
|
|
<Skeleton width={80} height={14} borderRadius={4} />
|
|
</View>
|
|
|
|
{/* 右下角按钮骨架 */}
|
|
<View style={styles.actionButtonRight}>
|
|
<Skeleton width={20} height={20} borderRadius={4} />
|
|
<Skeleton width={50} height={12} borderRadius={4} />
|
|
</View>
|
|
</View>
|
|
</View>
|
|
)
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
flex: 1,
|
|
backgroundColor: '#090A0B',
|
|
},
|
|
videoContainer: {
|
|
width: screenWidth,
|
|
backgroundColor: '#090A0B',
|
|
position: 'relative',
|
|
},
|
|
actionButtonLeft: {
|
|
position: 'absolute',
|
|
left: 12,
|
|
bottom: 16,
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
gap: 4,
|
|
paddingHorizontal: 6,
|
|
paddingVertical: 8,
|
|
},
|
|
actionButtonRight: {
|
|
position: 'absolute',
|
|
right: 13,
|
|
bottom: 13,
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
gap: 4,
|
|
},
|
|
})
|
|
|