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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@miniprogram-video-swiper-kit/slider

v1.2.0

Published

An out-of-box miniprogram components kit in video community scenario. This is slider.

Downloads

4

Readme

Miniprogram-video-swiper-kit

If this kit is useful to you, you can support me by staring the repo ⭐️

This is an out-of-box open-source miniprogram components kit in video community scenario.
It includes basic UI components, such as video-swiper, slider, comments-half-dialog,
and some business UI components like tiktok-panel, and wechat-channel-panel, etc.

Miniprogram-video-swiper-kit is based on the real massive user product in weChat miniprogram, and features a suite of customization options that make it easy to implement your own custom business design on top of these components.

These components are now used by the top miniprogram developers which they have grown to over 500 millions users in weChat.

Requirements

  1. Node.js version 10+
  2. NPM version 5+
  3. weChat miniprogram devtools version 1.02.1808300+
  4. weChat miniprogram lib version 2.2.1+

Installation

It's available as a package on NPM for use with a module bundler or in a Node application.
In your miniprogram project root directory with package.json, run:

# npm
npm i @miniprogram-video-swiper-kit/video-swiper

# yarn
yarn add @miniprogram-video-swiper-kit/video-swiper

You can check out this weChat miniprogram official doc to figure out how to use npm in miniprogram project.

If you want to install other components, just run:

# npm
npm i @miniprogram-video-swiper-kit/{{component-name}}

# yarn
yarn add @miniprogram-video-swiper-kit/{{component-name}}

Check out all available components here.

Documentation

The miniprogram-video-swiper-kit docs are located at https://docs.overio.space/miniprogram-video-swiper-kit/

Before Proceeding Further

@Miniprogram-video-swiper-kit/video-swiper is an easy-using component, but you should also consider weather it's appropriate for your situation. Please don't use this kit just because someone said you should, instead, you should take some time to understand the benefit and tradeoffs of using it.

Here are some suggestions on when it make sense to use it:

  • Your business scenario is based on social community.
  • You want a stable component that have been tested by massive client user.
  • The @miniprogram-components-plus/video-swiper of weChat team doesn't meet your demand, you can take a try.

On the other hand, this component's features about ui properties or events are not fully exported for you, some of them are hard code in pkg now, I will pick them out progressively.
So, if you have any help-wanted, feature idea, or bug report, please commit a issue or initiate a discussion to let me know;)
By the way, you can also join the Discord Chat Room with other developers.

Basic Examples

{
  "usingComponents": {
    "videoSwiper": "@miniprogram-video-swiper-kit/video-swiper"
  }
}
// page js
Page({
  data: {
    list: [
      {
        id: 'videoId-210709224656837141',
        url: 'http://vfx.mtime.cn/Video/2021/07/09/mp4/210709224656837141.mp4',
        du: 167000,
        objectFit: 'contain'
      },
      {
        id: 'videoId-210710094507540173',
        url: 'http://vfx.mtime.cn/Video/2021/07/10/mp4/210710094507540173.mp4',
        du: 132000,
        objectFit: 'contain'
      }
    ]
  },

  onSwiperChanged({ detail }) {
    const { item } = detail;
    console.log('swiper changed to: ', item);
  }
});
<!-- page wxml -->
<videoSwiper
  debug="{{true}}"
  list="{{list}}"
  sliderBottom="{{40}}"
  bind:onSwiperChanged="onSwiperChanged"
  generic:swiperItemPanel="view"
></videoSwiper>

Here are video-swiper's api of all properties and events

Examples

Motivation

why this project?

As the requirements of watching short video becoming increasingly common, the feature swiping up videos turning into an essential fundamental part of most products, especially in the community product.

So, it's essential to build an easy using, out of box swiping video component. The component is not provided by miniprogram officially, though it has a video-swiper component in miniprogram-component-plus of weChat team,
which is not perfectly compatible with some scenarios, such as some unexpected other video's voice playing when swiping the screen quickly, customizing play/pause state, and community interactive features, etc.

Based on the video-swiper, other out-of-box component follows, such as slider, comments-half-dialog, tiktok-panel, and wechat-channel-panel etc., with business bias features to build user friendly ui.

Logo

You can find the designed logo on GitHub.

License

MIT

More doc is on the way...