Gathering detailed insights and metrics for cordova-plugin-screen-orientation
Gathering detailed insights and metrics for cordova-plugin-screen-orientation
Gathering detailed insights and metrics for cordova-plugin-screen-orientation
Gathering detailed insights and metrics for cordova-plugin-screen-orientation
@awesome-cordova-plugins/screen-orientation
Awesome Cordova Plugins - Native plugins for ionic apps
cordova-plugin-ios-screen-orientation
Forked from https://github.com/apache/cordova-plugin-screen-orientation using it for testing purpose only it is unofficial
@cognifit/cordova-plugin-screen-orientation
CogniFit's fork of cordova-plugin-screen-orientation. Cordova Screen Orientation plugin
forked-cordova-plugin-screen-orientation
Forked version of Cordova Screen Orientation plugin
Apache Cordova Screen Orientation Plugin
npm install cordova-plugin-screen-orientation
Typescript
Module System
Node Version
NPM Version
JavaScript (52.32%)
Objective-C (33.45%)
Java (14.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
217 Stars
220 Commits
232 Forks
32 Watchers
7 Branches
47 Contributors
Updated on May 27, 2025
Latest Version
3.0.4
Package Id
cordova-plugin-screen-orientation@3.0.4
Unpacked Size
47.05 kB
Size
11.97 kB
File Count
12
NPM Version
9.8.1
Node Version
18.18.2
Published on
Nov 05, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, and windows-uwp. This plugin is based on Screen Orientation API so the api matches the current spec.
The plugin adds the following to the screen object (window.screen
):
1// lock the device orientation 2.orientation.lock('portrait') 3 4// unlock the orientation 5.orientation.unlock() 6 7// current orientation 8.orientation
1cordova plugin add cordova-plugin-screen-orientation
The orientation is in the primary portrait mode.
The orientation is in the secondary portrait mode.
The orientation is in the primary landscape mode.
The orientation is in the secondary landscape mode.
The orientation is either portrait-primary or portrait-secondary (sensor).
The orientation is either landscape-primary or landscape-secondary (sensor).
orientation is unlocked - all orientations are supported.
1// set to either landscape 2screen.orientation.lock('landscape'); 3 4// allow user rotate 5screen.orientation.unlock(); 6 7// access current orientation 8console.log('Orientation is ' + screen.orientation.type);
Both android and iOS will fire the orientationchange event on the window object. For this version of the plugin use the window object if you require notification.
1window.addEventListener("orientationchange", function(){ 2 console.log(screen.orientation.type); // e.g. portrait 3});
The 'change' event listener has also been added to the screen.orientation object.
1screen.orientation.addEventListener('change', function(){ 2 console.log(screen.orientation.type); // e.g. portrait 3}); 4 // OR 5 6screen.orientation.onchange = function(){console.log(screen.orientation.type); 7}; 8
The screen.orientation property will not update when the phone is rotated 180 degrees.
Windows store apps (windows-uwp) will only display orientation changes if the device has some sort of accelerometer. The internal state of the "orientation" will still be kept, but the actual screen won't rotate unless the device supports it.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 21/28 approved changesets -- score normalized to 7
Reason
3 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More