npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

dual-screen-plugin

v0.0.10

Published

A Capacitor plugin that enables apps to detect, control, and manage content across dual screens or external displays (based on presentation-capacitor).

Readme

Presentation API Capacitor Plugin

This Capacitor plugin provides seamless integration with the Presentation API, enabling developers to display content on secondary screens, such as projectors or external displays, directly from their mobile and web applications.

Features

  • Multiple Screen Support: Easily present content on external displays or projectors.
  • Customizable Content: Display custom HTML, videos, or other types of media.
  • Cross-Platform Compatibility: Works on Android and web platforms.
  • Simple Integration: Easily integrate with Capacitor and your existing project.
  • Real-Time Updates: Send real-time content updates to the external screen.

Install

| Capacitor Version |Presentation Version| | ------------- | ----------------------------------------------------------- | | Capacitor v4 | 0.0.5| | Capacitor v6 | 0.1.x| | Capacitor v7 | 0.2.x|

npm install presentation-capacitor
npx cap sync

Example Video (Example App included in repo)

https://github.com/user-attachments/assets/a2dbb1f7-6075-4285-885d-39136bc90d9b

API

open(...)

open(options: OpenOptions) => Promise<OpenResponse>

| Param | Type | | ------------- | --------------------------------------------------- | | options | OpenOptions |

Returns: Promise<OpenResponse>


sendMessage(...)

sendMessage<T>(options: { data: T; }) => Promise<T>

| Param | Type | | ------------- | ------------------------- | | options | { data: T; } |

Returns: Promise<T>


terminate()

terminate() => Promise<void>

getDeviceInfo()

getDeviceInfo() => Promise<{ name: string; osVersion: string; serialNumber: string; }>

Returns: Promise<{ name: string; osVersion: string; serialNumber: string; }>


addListener('onSuccessLoadUrl', ...)

addListener(eventName: 'onSuccessLoadUrl', listenerFunc: (data: any) => void) => any

| Param | Type | Description | | ------------------ | ----------------------------------- | ------------------------------------------------------- | | eventName | 'onSuccessLoadUrl' | | | listenerFunc | (data: any) => void | <br> Works only if type html of url or if browser |

Returns: any


addListener('onFailLoadUrl', ...)

addListener(eventName: 'onFailLoadUrl', listenerFunc: (data: any) => void) => any

| Param | Type | | ------------------ | ----------------------------------- | | eventName | 'onFailLoadUrl' | | listenerFunc | (data: any) => void |

Returns: any


addListener('onMessage', ...)

addListener(eventName: 'onMessage', listenerFunc: (data: any) => void) => any

| Param | Type | | ------------------ | ----------------------------------- | | eventName | 'onMessage' | | listenerFunc | (data: any) => void |

Returns: any


getDisplays()

getDisplays() => Promise<{ displays: number; }>

Returns: Promise<{ displays: number; }>


Type Aliases

OpenResponse

{ success?: any; error?: any; result?: any }

OpenOptions

{} & ( | { type: 'url'; url: string; } | { type: 'video'; videoOptions: { videoUrl: string; showControls?: boolean; }; } | { type: 'html'; html: string; } )