Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
mediaelement
Advanced tools
One file. Any browser. Same UI.
2.x
to 3.x
versionMediaElementPlayer: HTML5 <video>
and <audio>
player
A complete HTML/CSS audio/video player built on top MediaElement.js
. Many great HTML5 players have a completely separate Flash UI in fallback mode, but MediaElementPlayer.js uses the same HTML/CSS for all players.
MediaElement.js
is a set of custom Flash plugins that mimic the HTML5 MediaElement API for browsers that don't support HTML5 or don't support the media codecs you're using.
Instead of using Flash as a fallback, Flash is used to make the browser seem HTML5 compliant and enable codecs like H.264 (via Flash) on all browsers.
In general, MediaElement.js
supports IE9+, MS Edge, Chrome, Firefox, Safari, iOS 8+ and Android 4.0+.
4.x
VERSIONjQuery
has been completely removed from the code base, with the only exception of converting MediaElementPlayer
into a jQuery
plugin.
2.x
to 3.x
versionIn order to successfully install 3.x
in an existing setup, you must consider the following guidelines:
If your installation relies on the legacy player classes (i.e., mejs-player
, mejs-container
, etc.), you must set up the proper namespace. In 2.x
, the default namespace is mejs-
but now is mejs__
. In order to set up a new namespace (or the legacy one), use the classPrefix
configuration, and make sure you use the mediaelementplayer-legacy
stylesheet provided in the /build/
folder.
By default, MediaElement
has bundled native renderers, such as HLS, M(PEG)-DASH and FLV, as well as YouTube and Flash shims. If you want to use any other renderer, you MUST refer to the build/renderers
folder and add as many as you want. Check demo/index.html
for a better reference.
You must set up now the path for the Flash shims if they are not in the same folder as the JS files. To do this, set the path via the pluginPath
configuration. In the same topic, if you need to support browsers with Javascript disabled, you must reference the correct Flash shim, since in 2.x
there was only a single Flash shim and in 3.x
it was split to target specific media types. Check the Browsers with JavaScript disabled section for more details.
If you want to use Flash shims from a CDN, do the change related to pluginPath
setting the CDN's URL, and also setting shimScriptAccess
configuration as always
.
If you need to force the Flash shim, the way to do it in 3.x
version is to use the renderers
configuration and list them in an array.
pluginType
was removed to favor rendererName
. If you rely on that element, just create conditionals based on the renderer ID (all listed here). For example:
$('video, audio').mediaelementplayer({
// Configuration
success: function(media) {
var isNative = media.rendererName.match(/html5|native/);
var isYoutube = media.rendererName.match(/youtube/);
// etc.
}
});
It is strongly recommended to read the documentation and check the demo
folder to get the most out of this package. Visit here to start.
The full documentation on how to install MediaElement.js
is available at Installation.
A brief guide on how to create and use instances of MediaElement
available at Usage.
Additional features can be found at https://github.com/mediaelement/mediaelement-plugins
MediaElement.js
has many options that you can take advantage from. Visit API and Configuration for more details.
Also, a Utilities/Features
guide is available for development. Visit Utilities/Features for more details.
If you want to contribute to improve this package, please read Guidelines.
NOTE: If you would like to contribute with translations, make sure that you also check https://github.com/mediaelement/mediaelement-plugins, and perform the
translations for the files suffixed as -i18n
.
A compilation of useful articles can be found here.
Changes available at Change Log
IMPORTANT: Before posting an issue, it is strongly encouraged to read the whole documentation since it covers the majority of scenarios exposed in prior issues.
New features and pending bugs can be found at TODO list.
FAQs
One file. Any browser. Same UI.
The npm package mediaelement receives a total of 6,424 weekly downloads. As such, mediaelement popularity was classified as popular.
We found that mediaelement demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.