Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@542.digital/tencent-video-player
Advanced tools
This package provides a wrapper around the Tencent TCPlayer library, making it easy to incorporate a feature-rich video player into your JavaScript or TypeScript application.
This package provides a wrapper around the Tencent TCPlayer library, making it easy to incorporate a feature-rich video player into your JavaScript or TypeScript application.
Bump for a deploy Bump for a deploy
npm install @542.digital/tencent-video-player
OR
yarn add @542.digital/tencent-video-player
import { VideoPlayer } from "@542.digital/tencent-video-player";
// Create a new player instance with your options
const player = new VideoPlayer(options);
// Add the player to your HTML
<audio id="player-container-id"></audio>;
player.init("player-container-id", window.TCPlayer);
constructor(options: PlayerOptions)
VideoPlayer
instance.init(elementId: string)
void
play()
void
getPercentageOfVideo()
string
).on(eventType: PlayerEventType, callback: Function)
void
Examples
// Create a new player
const options = {
appID: "your-app-id",
fileID: "your-file-id",
psign: "your-psign",
width: "640",
height: "360",
// ... other options
};
const player = new VideoPlayer(options);
<video id="player-container-id"></video>;
// Add the player to your HTML
player.init("player-container-id", TCPlayer);
// Play the video
player.play();
// Log the percentage of the video that has been played every second
setInterval(() => {
console.log(player.getPercentageOfVideo());
}, 1000);
// Listen for the 'play' event
player.on("play", () => {
console.log("Video playback started");
});
player.on("timeupdate", () => {
console.log(player.getPercentageOfVideo());
});
This package is licensed under the MIT License - see the LICENSE.md file for details.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
FAQs
This package provides a wrapper around the Tencent TCPlayer library, making it easy to incorporate a feature-rich video player into your JavaScript or TypeScript application.
We found that @542.digital/tencent-video-player 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.