React Native view renderer on External Display. Also supports Multiple Scenes on iOS.
import React from 'react'
import Video from 'react-native-video'
import ExternalDisplay, {
useExternalDisplay,
} from 'react-native-external-display'
function App() {
const screens = useExternalDisplay()
return (
<ExternalDisplay
mainScreenStyle={{ flex: 1 }}
fallbackInMainScreen
screen={Object.keys(screens)[0]}
>
<Video
source={{
uri: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4',
}}
style={{ flex: 1 }}
repeat
muted
/>
</ExternalDisplay>
)
}
No selected screen | Selected |
---|---|
iPod Touch connected to TV via AirPlay
DevSettings
module of React Native. (Such as through react-native-debugger
)Modal
, it always show on main screen for AndroidIf you want the app works on iPad Split View and External screen, the app should be main screen (on left as Split View), It doesn't work on right side or as Slide Over, because it wouldn't receive UIScreenDidConnectNotification
event.
Built and maintained by BRICKS.