
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
tauri-plugin-mpv-api
Advanced tools
A Tauri plugin that embeds MPV media player window into your Tauri applications.
A Tauri plugin that embeds MPV media player window into your Tauri applications.
This plugin provides a simple and efficient way to embed MPV into your Tauri applications. It uses MPV's JSON IPC interface to communicate with the MPV process.
npm run tauri add mpv
For MPV to properly embed into your Tauri window, you need to configure transparency:
tauri.conf.json:{
"app": {
"windows": [
{
"title": "Your App",
"width": 1280,
"height": 720,
"transparent": true // Add this line
}
]
}
}
/* In your main CSS file */
html,
body {
background: transparent;
}
import { destroyMpv, initializeMpv, MpvConfig, observeMpvProperties, sendMpvCommand } from "tauri-plugin-mpv-api";
// Properties to observe
const OBSERVED_PROPERTIES = ['pause', 'time-pos', 'duration', 'filename'] as const;
// MPV configuration
const mpvConfig: MpvConfig = {
mpvArgs: [
'--vo=gpu-next',
'--hwdec=auto-safe',
],
observedProperties: OBSERVED_PROPERTIES,
ipcTimeoutMs: 2000,
showMpvOutput: false,
};
// Initialize MPV
try {
console.log('Initializing MPV with properties:', OBSERVED_PROPERTIES);
await initializeMpv(mpvConfig);
console.log('MPV initialization completed successfully!');
} catch (error) {
console.error('MPV initialization failed:', error);
}
// Destroy MPV when no longer needed
await destroyMpv();
// Observe properties
const unlisten = await observeMpvProperties(
OBSERVED_PROPERTIES,
({ name, data }) => {
switch (name) {
case 'pause':
console.log('Playback paused state:', data);
break;
case 'time-pos':
console.log('Current time position:', data);
break;
case 'duration':
console.log('Duration:', data);
break;
case 'filename':
console.log('Current playing file:', data);
break;
}
});
// Unlisten when no longer needed
unlisten();
// Load and play a file
await sendMpvCommand({ command: ['loadfile', '/path/to/video.mp4'] });
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Tauri plugin for embedding the mpv player in your app by controlling its process via JSON IPC.
The npm package tauri-plugin-mpv-api receives a total of 40 weekly downloads. As such, tauri-plugin-mpv-api popularity was classified as not popular.
We found that tauri-plugin-mpv-api demonstrated a healthy version release cadence and project activity because the last version was released less than 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.