Gathering detailed insights and metrics for forked-cordova-plugin-screen-orientation
Gathering detailed insights and metrics for forked-cordova-plugin-screen-orientation
Gathering detailed insights and metrics for forked-cordova-plugin-screen-orientation
Gathering detailed insights and metrics for forked-cordova-plugin-screen-orientation
Cordova Plugin Screen Orientation
npm install forked-cordova-plugin-screen-orientation
Typescript
Module System
Node Version
NPM Version
71
Supply Chain
98.8
Quality
77.3
Maintenance
100
Vulnerability
100
License
JavaScript (59.18%)
Objective-C (24.15%)
Java (16.68%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
198 Commits
6 Branches
Updated on Jun 01, 2021
Latest Version
1.0.0
Package Id
forked-cordova-plugin-screen-orientation@1.0.0
Unpacked Size
41.07 kB
Size
10.73 kB
File Count
11
NPM Version
7.12.1
Node Version
10.19.0
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
AppVeyor | Travis CI |
---|---|
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
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
16 existing vulnerabilities detected
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