import * as reselect from 'reselect' ; import { getDeviceManager } from './baseSelectors' ; private export const localPreviewSelector = reselect . createSelector ( [ getDeviceManager ] , ( deviceManager ) => { const view = deviceManager . unparentedViews . length > 0 && deviceManager . unparentedViews [ 0 ] . view ; return { videoStreamElement : view ? view . target : null } ; } ) ;