Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
plex-websocket
Advanced tools
Readme
Read Github README, in case of unpublished changes
A tool to allow JavaScript and Typescript users to aquire the full power of plex-api with Websockets
YOU DO NOT NEED TO INSTALL plex-api IT COMES WITH THE MODULE
Please note that plex-api has no type declarations so installing it might be better
npm install plex-websocket
This will work with the plex-api authenticator tool. The websocket just needs the authToken which is provided either by you or by the authenticator module
const LOGININFO = {
hostname: "255.255.255.255",
username: "example@gmail.com",
token: "app.plex.tv/desktop => Inspect => Application => Local Storage => myPlexAccessToken"
}; // Login information of the Plex Media User
const PlexAPI = require("plex-api");
const PlexLogin = new PlexAPI(LOGININFO); // Login with plex-api
function onPacket(type, data) {
if (type === PlexWebsocket.WebsocketClient.PACKETTYPES.PLAYING) {
console.log("\nPlaying State Change");
console.log("Session IDs: ", data.PlaySessionStateNotification.map(session => session.sessionKey).join(", "));
console.log("Rating Keys: ", data.PlaySessionStateNotification.map(session => session.ratingKey).join(", "));
console.log("States: ", data.PlaySessionStateNotification.map(session => session.state).join(", "));
}
} // Create a function for receiving packets
// Create a WebsocketClient with the create plex-api login and onPacket function
const WSClient = new PlexWebsocket.WebsocketClient(PlexLogin, onPacket);
WSClient.websocket.on("connect", () => console.log("Connected")); // When a successful connection is made
WSClient.websocket.on("error", err => console.log("Error\n", err)); // When an error occurs (Will terminate program)
WSClient.websocket.on("debug", message => console.log("Debug\n", message)); // Debug event for errors
npm test
Script Location
Ensure that LOGININFO has been filled in with your information
const LOGININFO = {
hostname: "255.255.255.255",
username: "example@gmail.com",
token: "app.plex.tv/desktop => Inspect => Application => Local Storage => myPlexAccessToken"
};
FAQs
Read [Github](https://github.com/Forbidden-Duck/plex-websocket) README, in case of unpublished changes # Plex-Websocket A tool to allow JavaScript and Typescript users to aquire the full power of [plex-api](https://github.com/phillipj/node-plex-api) wit
The npm package plex-websocket receives a total of 1 weekly downloads. As such, plex-websocket popularity was classified as not popular.
We found that plex-websocket 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.