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
cordova-plugin-ios-screen-orientation
Forked from https://github.com/apache/cordova-plugin-screen-orientation using it for testing purpose only it is unofficial
@ionic-native/screen-orientation
Ionic Native - Native plugins for ionic apps
cordova-plugin-splashscreen
Cordova Splashscreen Plugin
@ionic-native/splash-screen
Ionic Native - Native plugins for ionic apps
npm install cordova-plugin-screen-orientation
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
219 Stars
220 Commits
229 Forks
32 Watching
7 Branches
46 Contributors
Updated on 26 Oct 2024
JavaScript (52.32%)
Objective-C (33.45%)
Java (14.23%)
Cumulative downloads
Total Downloads
Last day
5.1%
4,823
Compared to previous day
Last week
5%
24,066
Compared to previous week
Last month
3.2%
107,629
Compared to previous month
Last year
-16.4%
1,385,569
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 dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
Found 21/28 approved changesets -- score normalized to 7
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
1 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 2024-11-25
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