
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
media-element-syncer
Advanced tools
Synchronise two or more HTML5 media elements. Similar to the unimplemented MediaController api.
This works by continuously adjusing the playbackRate of the media elements, or performing a seek operation if the difference is too big.
npm install --save media-element-syncer
All media elements passed to addChild will remain synchronised with the source element.
MediaElementSyncer is eligible for garbage collection when there are no children.
import { MediaElementSyncer } from 'media-element-syncer';
const source = document.getElementById('source');
const destination1 = document.getElementById('destination1');
const destination2 = document.getElementById('destination2');
const syncer = new MediaElementSyncer(source);
syncer.addChild(destination1);
syncer.addChild(destination2, { offset: -1000 });
// syncer.removeChild(destination1);
The optional second param to MediaElementSyncer takes an object which has the following optional properties:
refreshInterval: how often to resync the elements. (default: 200ms)correctionTime: how many milliseconds into the future to aim for being in sync. (default: 500ms)seekThreshold: if the time is out by more than this amount, a seek will be performed instead of adjusting the playbackRate. (default: 1000ms)The code for the demo is here and there is a hosted version here.
FAQs
Synchronise two or more html media elements.
The npm package media-element-syncer receives a total of 1 weekly downloads. As such, media-element-syncer popularity was classified as not popular.
We found that media-element-syncer 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.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.