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.
@mux/videojs-kit
Advanced tools
The Video.js you know and love but optimized for using with Mux. The base is slimmed down a bit, then there are a few plugins included, namely Mux Data, and uses hls.js as the HLS playback engine. This is due to some issues we've seen with the default Vid
The Video.js you know and love but optimized for using with Mux. The base is slimmed down a bit, then there are a few plugins included, namely Mux Data, and uses hls.js as the HLS playback engine. This is due to some issues we've seen with the default Video.js playback engine and Mux streams.
// npm
npm install @mux/videojs-kit
// yarn
yarn add @mux/videojs-kit
In the below examples, replace the src
attribute example to reflect the playback ID of your chosing.
Import the javascript and css in your application like this:
// include the video.js kit javascript and css
import videojs from '@mux/videojs-kit';
import '@mux/videojs-kit/dist/index.css';
Then, on your page include a element where you want to add your player.
<video
id="mux-default"
class="video-js vjs-16-9"
controls
preload="auto"
width="100%"
poster="https://image.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/thumbnail.jpg"
data-setup='{
"plugins": {
"mux": {
"timelineHoverPreviews": true,
"data": {
"env_key": "ENV_KEY",
"video_title": "My Great Video"
}
}
}
}'
>
<source src="DS00Spx1CV902MCtPj5WknGlR102V5HFkDe" type="video/mux" />
</video>
Of course, you can also initialize all of this via JS as well:
<video
id="mux-default"
class="video-js vjs-16-9"
controls
preload="auto"
width="100%"
poster="https://image.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/thumbnail.jpg"
/>
<script type="text/javascript">
const player = videojs('mux-default', {
"plugins": {
"mux": {
"timelineHoverPreviews": true,
"data": {
"env_key": "ENV_KEY",
"video_title": "My Great Video"
}
}
}
});
player.src({ type: 'video/mux', src: 'DS00Spx1CV902MCtPj5WknGlR102V5HFkDe' });
</script>
Also, the demos are a great place to more references! In general, you can expect this to work almost exactly like Video.js + Mux Data with a few extra niceties. Mux streams can be specified by simply including the playback ID as the src
, and video/mux
as the type.
FAQs
The Video.js you know and love but optimized for using with Mux. The base is slimmed down a bit, then there are a few plugins included, namely Mux Data, and uses hls.js as the HLS playback engine. This is due to some issues we've seen with the default Vid
The npm package @mux/videojs-kit receives a total of 4,736 weekly downloads. As such, @mux/videojs-kit popularity was classified as popular.
We found that @mux/videojs-kit 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.