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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openwebf/vue-video-player

v1.0.0

Published

HTML5-compatible video player for WebF applications. Wraps Flutter's video_player package with a familiar HTML5 video element API.

Readme

WebF Video Player

HTML5-compatible video player for WebF applications. Wraps Flutter's video_player package with a familiar HTML5 video element API.

Installation

Add this package to your pubspec.yaml:

dependencies:
  webf_video_player: ^1.0.0

Setup

Register the custom element in your Flutter app's main function:

import 'package:webf_video_player/webf_video_player.dart';

void main() {
  installWebFVideoPlayer();
  runApp(MyApp());
}

Usage

Basic Example

<webf-video-player
  src="https://example.com/video.mp4"
  controls
></webf-video-player>

With All Options

<webf-video-player
  src="https://example.com/video.mp4"
  poster="https://example.com/poster.jpg"
  controls
  autoplay
  muted
  loop
  volume="0.8"
  playback-rate="1.0"
  object-fit="contain"
></webf-video-player>

JavaScript Control

const video = document.querySelector('webf-video-player');

// Play/Pause
video.play();
video.pause();

// Seek to 30 seconds
video.currentTime = 30;

// Adjust volume
video.volume = 0.5;
video.muted = true;

// Change playback speed
video.playbackRate = 1.5;

// Listen to events
video.addEventListener('play', () => console.log('Playing'));
video.addEventListener('pause', () => console.log('Paused'));
video.addEventListener('ended', () => console.log('Ended'));
video.addEventListener('timeupdate', (e) => {
  console.log('Current time:', e.detail.currentTime);
});
video.addEventListener('error', (e) => {
  console.error('Error:', e.detail.message);
});

Properties

| Property | Type | Default | Description | |----------|------|---------|-------------| | src | string | - | Video source URL. Supports http://, https://, asset://, file:// | | poster | string | - | Poster image URL displayed before playback | | autoplay | boolean | false | Auto-start playback when loaded | | controls | boolean | true | Show playback controls | | loop | boolean | false | Loop video continuously | | muted | boolean | false | Mute audio | | volume | number | 1.0 | Volume level (0.0 to 1.0) | | playbackRate | number | 1.0 | Playback speed (0.25 to 2.0) | | currentTime | number | 0 | Current position in seconds (read/write) | | objectFit | string | 'contain' | Video sizing: 'contain', 'cover', 'fill', 'none' | | preload | string | 'metadata' | Preload hint: 'none', 'metadata', 'auto' | | playsInline | boolean | true | Play inline on iOS (vs fullscreen) |

Read-only Properties

| Property | Type | Description | |----------|------|-------------| | duration | number | Total duration in seconds | | paused | boolean | Whether playback is paused | | ended | boolean | Whether playback has ended | | seeking | boolean | Whether currently seeking | | readyState | number | Loading ready state (0-4) | | networkState | number | Network state (0-3) | | videoWidth | number | Natural video width in pixels | | videoHeight | number | Natural video height in pixels | | buffering | boolean | Whether currently buffering |

Events

| Event | Detail | Description | |-------|--------|-------------| | loadstart | - | Browser starts loading | | loadedmetadata | {duration, videoWidth, videoHeight} | Metadata loaded | | loadeddata | - | First frame loaded | | canplay | - | Ready to play | | canplaythrough | - | Can play without buffering | | play | - | Playback started | | playing | - | Playback ready after pause/buffer | | pause | - | Playback paused | | ended | - | Playback ended | | waiting | - | Buffering/stalled | | seeking | - | Seek operation started | | seeked | - | Seek operation completed | | timeupdate | {currentTime, duration} | Position update (~4x/sec) | | durationchange | {duration} | Duration changed | | volumechange | {volume, muted} | Volume/mute changed | | ratechange | {playbackRate} | Playback rate changed | | progress | - | Download progress | | error | {code, message} | Error occurred |

Methods

| Method | Returns | Description | |--------|---------|-------------| | play() | void | Start playback | | pause() | void | Pause playback | | load() | void | Reload video source | | canPlayType(mimeType) | string | Check MIME support ('', 'maybe', 'probably') |

Source URL Protocols

| Protocol | Example | Description | |----------|---------|-------------| | http:// | http://example.com/video.mp4 | HTTP URL | | https:// | https://example.com/video.mp4 | HTTPS URL | | asset:// | asset://videos/intro.mp4 | Flutter asset | | file:// | file:///path/to/video.mp4 | Local file |

Supported Formats

The supported video formats depend on the platform:

| Format | iOS | Android | Description | |--------|-----|---------|-------------| | MP4 (H.264) | Yes | Yes | Most compatible | | WebM | No | Yes | Android only | | HLS | Yes | Yes | Streaming format |

Platform Configuration

iOS

Add to ios/Runner/Info.plist for network video playback:

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

Android

Add to android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET"/>

License

Apache License 2.0