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

szxc-player-vue3

v0.0.4

Published

数字乡村播放器

Readme

szxc-player-vue3

简介

江西电信数字乡村研发团队封装的基于 vue3.0 的视频播放器

安装

npm install szxc-player-vue3 --save
or
yarn add szxc-player-vue3

使用

  • 在项目 main.js 中导入szxc-player-vue3
import { createApp } from "vue";
import App from "./App.vue";
import axios from "axios";

// 导入 szxc-player-vue3和样式
import "szxc-player-vue3/style.css";
import SzxcPlayer from "szxc-player-vue3";

// 可自定义options
const videoPlayOption = {
  // 加载视频信息函数(此项必须配置)
  loadVideoInfo: (videoId, resolve, reject) => {
    axios
      .get(
        "https://mobile.nccxgh.com/gswg/api/backstage/tFacilityMonitor/get",
        {
          params: {
            monitorId: videoId
          }
        }
      )
      .then((res) => {
        resolve(res.data);
      })
      .catch((err) => {
        reject(err);
      });
  }
};

const app = createApp(App);

app.use(SzxcPlayer, videoPlayOption);

app.mount("#app");
  • 在 vue 组件中使用
<template>
  <div class="video-wrap" style="width: 400px;height: 300px;">
    <szxc-player :id="videoId" />
  </div>
</tempate>

props

| 名称 | 说明 | 类型 | 默认值 | | ------------------ | -------------------------------- | ------------- | --------------------- | | id | 视频监控的 id-必传 | number/string | - | | index | 视频的 key 需保证唯一 | number | 0 | | showErrorMessage | 是否顶部显示错误信息 | boolean | true | | options | 同上述全局配置的 videoPlayOption | object | defaualtConfigOptions |

events

| 名称 | 说明 | 回调参数 | 默认值 | | ------------------ | -------------------------------- | ------------- | --------------------- | | fullScreen | 全屏事件(仅西瓜视频) | {id, state: false/true} | - |

  • 默认全局配置项
const defaultConfigOptions = {
  // 新天翼云眼metaPlayer播放器地址
  metaPlayerUrl:
    "https://vcp.21cn.com/metaplayer/static/template/2.0.0/player.html?appId=3891e8&streamSrc=",
  // ffmpeg转码推流服务端地址
  webSocketUrl: "ws://106.225.209.148:9991",
  // 视频对象属性映射
  props: {
    no: "deviceNo",
    name: "deviceName",
    model: "deviceModel",
    protocol: "videoProtocol",
    url: "videoUrl",
    urls: "videoUrls"
  },
  // 网络请求配置项
  networkOptions: {
    retryCount: 3, // 重试次数
    retryDelay: 1000, // 每次重试间隔
    loadTimeout: 15000, // 请求超时时间
    keepAliveInterval: 0, // 保活间隔
    tyyy: {
      retryCount: 2,
      loadTimeout: 10000
    },
    slefarmer: {
      retryCount: 3,
      retryDelay: 5000,
      keepAliveInterval: 45000
    }
  }
};

支持

  • 如果项目对你有帮助,请点颗星:star:,谢谢。
  • 如果你对项目有想法、问题、BUG,欢迎讨论。