Media


CameraView

A full-screen or inline camera preview with configurable facing, aspect ratio, and flash mode.

PropTypeDefaultDescription
facing?'front' | 'back''back'Which camera to use
aspectRatio?number4/3Container aspect ratio
flash?'on' | 'off' | 'auto''off'Flash / torch mode
onCapture?(uri: string) => voidCalled with the captured image URI
accessibilityLabel?string'Camera'Accessibility label
testID?stringTest identifier
import { CameraView } from '@objectifthunes/limestone-sdk';

<CameraView
  facing="back"
  aspectRatio={4 / 3}
  onCapture={(uri) => console.log('Captured:', uri)}
/>

ImagePicker

A button or thumbnail that opens the system image picker. Supports single and multiple selection.

PropTypeDefaultDescription
variant?'button' | 'thumbnail''button'Visual presentation
multiple?booleanfalseAllow selecting multiple images
quality?number0.8JPEG compression quality (0–1)
onSelect?(assets: MediaAsset[]) => voidCalled with selected assets
accessibilityLabel?stringAccessibility label
testID?stringTest identifier
import { ImagePicker } from '@objectifthunes/limestone-sdk';

<ImagePicker
  multiple
  quality={0.9}
  onSelect={(assets) => setImages(assets)}
/>

VideoPlayer

An inline video player with optional native controls, autoplay, loop, and mute support.

PropTypeDefaultDescription
sourceVideoSource{ uri: string } or { asset: number }
autoPlay?booleanfalseStart playing on mount
loop?booleanfalseLoop playback
muted?booleanfalseMute audio
showControls?booleantrueShow native playback controls
aspectRatio?number16/9Container aspect ratio
onEnd?() => voidCalled when playback completes
accessibilityLabel?stringAccessibility label
testID?stringTest identifier
import { VideoPlayer } from '@objectifthunes/limestone-sdk';

<VideoPlayer
  source={{ uri: 'https://example.com/video.mp4' }}
  autoPlay
  loop
  aspectRatio={16 / 9}
/>

A horizontally scrolling carousel with optional auto-play, dots, and arrow navigation.

PropTypeDefaultDescription
itemsCarouselItem[]Each item: { key, content }
autoPlay?booleanfalseAdvance slides automatically
autoPlayInterval?number3000Milliseconds between slides
loop?booleanfalseWrap around after the last slide
showDots?booleantrueShow page indicator dots
showArrows?booleanfalseShow previous/next arrow buttons
gap?SpacingPropGap between slides
snapAlignment?'start' | 'center' | 'end''start'Snap position
accessibilityLabel?stringAccessibility label
testID?stringTest identifier
import { Carousel } from '@objectifthunes/limestone-sdk';

const slides = [
  { key: 'a', content: <Image src="..." alt="Slide 1" /> },
  { key: 'b', content: <Image src="..." alt="Slide 2" /> },
];

<Carousel items={slides} autoPlay loop showDots />

QRScanner

A full-screen QR/barcode scanner that calls onScan with the decoded value.

PropTypeDefaultDescription
onScan?(value: string) => voidCalled with the scanned string
onError?(error: Error) => voidCalled on scanner error
torchEnabled?booleanfalseEnable the device torch
vibrate?booleantrueVibrate on successful scan
aspectRatio?number1Container aspect ratio
accessibilityLabel?string'QR Scanner'Accessibility label
testID?stringTest identifier
import { QRScanner } from '@objectifthunes/limestone-sdk';

<QRScanner
  onScan={(value) => handleQR(value)}
  torchEnabled={flashEnabled}
/>

AudioPlayer

An audio playback widget with compact or full-player layout.

PropTypeDefaultDescription
sourcestringAudio file URI
variant?'compact' | 'full''compact'Visual layout
autoPlay?booleanfalseStart playing on mount
loop?booleanfalseLoop playback
onComplete?() => voidCalled when playback ends
accessibilityLabel?stringAccessibility label
testID?stringTest identifier
import { AudioPlayer } from '@objectifthunes/limestone-sdk';

<AudioPlayer
  source="https://example.com/audio.mp3"
  variant="full"
  onComplete={() => markListened()}
/>

MapView

An inline map with markers, user location, and optional pan/zoom callbacks.

PropTypeDefaultDescription
regionMapRegion{ latitude, longitude, latitudeDelta, longitudeDelta }
markers?MapMarker[][]Each marker: { id, coordinate, title?, description? }
showUserLocation?booleanfalseOverlay the user’s GPS position
zoomEnabled?booleantrueAllow pinch-to-zoom
scrollEnabled?booleantrueAllow pan gestures
aspectRatio?number16/9Container aspect ratio
onMarkerPress?(marker: MapMarker) => voidCalled when a marker is tapped
accessibilityLabel?string'Map'Accessibility label
testID?stringTest identifier
import { MapView } from '@objectifthunes/limestone-sdk';

<MapView
  region={{ latitude: 48.8566, longitude: 2.3522, latitudeDelta: 0.05, longitudeDelta: 0.05 }}
  markers={[{ id: 'paris', coordinate: { latitude: 48.8566, longitude: 2.3522 }, title: 'Paris' }]}
  showUserLocation
/>

WebView

An inline web view that renders a remote URL or inline HTML.

PropTypeDefaultDescription
uri?stringRemote URL to load
html?stringInline HTML string (takes precedence over uri)
onLoad?() => voidCalled when the page finishes loading
onError?(error: Error) => voidCalled on navigation error
onMessage?(data: string) => voidCalled when the page posts a message via window.ReactNativeWebView.postMessage
injectedJavaScript?stringJavaScript injected after each page load
aspectRatio?number16/9Container aspect ratio
accessibilityLabel?stringAccessibility label
testID?stringTest identifier
import { WebView } from '@objectifthunes/limestone-sdk';

<WebView
  uri="https://example.com"
  onMessage={(data) => handleMessage(data)}
/>