Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
videojs-mobile-ui
Advanced tools
Mobile UI for Video.js.
Touch controls:
Fullscreen control:
npm install video.js
npm install videojs-mobile-ui
Version 1.x requires video.js 8.x as a peer dependency. Lowever video.js versions are not supported. 0.7.0 supports video.js 7.x. To install the latest version that works with Video.js 7, use the latest7
tag:
npm install videojs-mobile-ui@latest7
{
fullscreen: {
enterOnRotate: true,
exitOnRotate: true,
lockOnRotate: true,
lockToLandscapeOnEnter: false,
disabled: false
},
touchControls: {
seekSeconds: 10,
tapTimeout: 300,
disableOnEnd: false,
disabled: false,
}
};
boolean
Whether to go fullscreen when rotating to landscapeboolean
Whether to leave fullscreen when rotating to portrait (if not locked)boolean
Whether to lock to fullscreen when rotating to landscapeboolean
Whether to lock to landscape when entering fullscreen (works even when device rotation is disabled/non-functional)boolean
If true no fullscreen handling except the deprecated iOS fullwindow hackint
Seconds to seek when double-tappingint
Milliseconds to consider a double-tapboolean
Whether to disable touch controls when the video has ended, e.g. if an endscreen is used. Automatically disables if the endscreen plugin is present when this plugin initialisesboolean
If true no touch controls are added.To include videojs-mobile-ui on your website or web application, use any of the following methods.
<script>
TagThis is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs
global is available.
<link rel="stylesheet" href="//path/to/videojs-mobile-ui.css">
<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-mobile-ui.min.js"></script>
<script>
var player = videojs('my-video');
player.mobileUi();
</script>
The release versions will be available on jdselivr, unpkg etc.
When using with Browserify, install videojs-mobile-ui via npm and require
the plugin as you would any other module.
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-mobile-ui');
var player = videojs('my-video');
player.mobileUi();
Also include the CSS.
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require
the plugin as you normally would:
require(['video.js', 'videojs-mobile-ui'], function(videojs) {
var player = videojs('my-video');
player.mobileUi();
});
Also include the CSS.
To import into React etc import both the package and the script
import videojs from 'video.js'
import 'videojs-mobile-ui/dist/videojs-mobile-ui.css';
import 'videojs-mobile-ui';
MIT. Copyright (c) mister-ben <git@misterben.me>
1.1.1 (2023-09-22)
<a name="1.1.0"></a>
<a name="1.0.1"></a>
FAQs
Mobile tap controls and fullscreen on rotate for Video.js
The npm package videojs-mobile-ui receives a total of 2,543 weekly downloads. As such, videojs-mobile-ui popularity was classified as popular.
We found that videojs-mobile-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.