react-native-theoplayer
Version:
A THEOplayer video component for react-native.
21 lines (18 loc) • 854 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getFullscreenSize = getFullscreenSize;
var _reactNative = require("react-native");
/**
* Calculate the device's screen dimensions, while taking into account the full usable screen dimensions on Android.
*/
function getFullscreenSize() {
const screenSize = _reactNative.Dimensions.get('screen');
// On Android, ask the platform for the full usable screen dimensions.
// It should return the full usable screen size, including support for edgeToEdge layouts.
// {@link https://developer.android.com/develop/ui/views/layout/edge-to-edge}
const nativeDims = _reactNative.NativeModules.THEORCTPlayerModule.getUsableScreenDimensions();
return nativeDims.width > 0 && nativeDims.height > 0 ? nativeDims : screenSize;
}
//# sourceMappingURL=Dimensions.js.map