Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
empplayer2-dev
Advanced tools
EMP HTML5 player is build on top of VideoJS 6
VideoJS is an HTML5 video player that we use as a base to create our own player. VideoJS provides us with many common tasks required for modern video players. Including but not limited to
As such it is encouraged to re-use as much as possible from the VideoJS library. For more information about VideoJS
A reference app that uses this package is available here;
As a developer you need to add custom ui-logic to the receiver-app and customize index.html file. To build the code there are a few requirements
Unix-based systems
sudo npm install -g grunt-cli
Windows
npm install -g grunt-cli
to setup your project
npm install
Some grunt tasks are available:
grunt
grunt dev
Builds the reference and demo player.
grunt dist
Builds the code and and places the final app in dist
folder.
grunt deploy
An example on how to use ftp to send the app to a webserver. If the ftp server requires authentication, credentials should be placed in a file .ftpauth in the root of the project
Javascript for the Receiver will be written using the new ES6 standard. Using grunt tasks this is then re-written to the ES5 standard where available. To learn more about Es6 see babel. To keep our code clean and separated, we uses Browserify. This allows us to use require statements to import javascript code from other files.
All of the above is done automatically using the grunt build system, but during development one should be aware of the power, and the limitations of both systems.
Using EMP Player is as simple as creating a <video>
element, but with an additional data-setup
attribute. At a minimum, this attribute must have a value of '{}'
, but it can include any empPlayer options - just make sure it contains valid JSON!
<video
id="my-player"
class="video-js"
controls
preload="auto"
poster="//vjs.zencdn.net/v/oceans.png"
data-setup='{}'>
<source src=https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 type=application/x-mpegURL>
<source src=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 type=video/mp4>
<source src="https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.mpd" type="application/dash+xm">
<source src="npa2_qwerty" type="video/emp">
<source src='{"channelId":"750837_qwerty"}' type="video/emp">
</video>
When the page loads, EMP Player will find this element and automatically setup a player in its place.
If you don't want to use automatic setup, you can leave off the data-setup
attribute and initialize a <video>
element manually using the empPlayer
function:
var player = empPlayer('my-player');
The empPlayer
function also accepts an options
object and a callback to be invoked
when the player is ready:
var options = {};
var player = empPlayer('my-player', options, function onPlayerReady() {
empPlayer.log('Your player is ready!');
// In this context, `this` is the player that was created by Video.js.
this.play();
// How about an event listener?
this.on('ended', function() {
empPlayer.log('Awww...over so soon?!');
});
});
If you're ready to dive in, the Getting Started page and documentation are the best places to go for more information.
FAQs
EMP Player v2 SDK
The npm package empplayer2-dev receives a total of 113 weekly downloads. As such, empplayer2-dev popularity was classified as not popular.
We found that empplayer2-dev 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.