@innei/winplayer-rs
TypeScript icon, indicating that this package has built-in type declarations

0.1.2-fork.1 • Public • Published

WinPlayer-Node

Now featuring: Rust rewrite!

HUGE thanks to Viola for helping me learn Rust! <3

Quickstart

import winplayer, { Status, Position } from "winplayer-rs/emitter";

// in an async body
const playerManager = await winplayer();
if (playerManager) {
	playerManager.on("MediaPropertiesChanged", (status: Status) => {
		console.log(status);
	});

	playerManager.on("PlaybackInfoChanged", (status: Status) => {
		console.log(status);
	});

	playerManager.on("TimelinePropertiesChanged", (position: Position) => {
		console.log(position);
	});
}

Also please look at test.js to use the native bindings, or test-emitter.js for a comprehensive example of the events emitted by the emitter wrapper.

It is highly encouraged to use the emitter wrapper if you're in a rush, otherwise please use the bindings directly and implement your own stuff that way.

Readme

Keywords

none

Package Sidebar

Install

npm i @innei/winplayer-rs

Weekly Downloads

3

Version

0.1.2-fork.1

License

MPL-2.0

Unpacked Size

2.91 MB

Total Files

22

Last publish

Collaborators

  • innei