1.1.0 • Published 8 months ago

vue-video-streaming v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

vue-video-streaming

Install & Use

npm install vue-video-streaming
#or
yarn add vue-video-streaming

Import and register component

Global

import Vue from 'vue'
import VueVideoStreaming from 'vue-video-streaming'
Vue.use(VueVideoStreaming)

Local

<template>
    <vue-video-streaming
        :videodatas="videoDatas"
        :commentlist="commentList"
        :commenttotal="commentTotal"
        :userinfo="info"
        :sliderimg="sliderImg"
        @uploaddata="getvideoList"
        @getcomment="getcommentList"
        @updatecomment="updateComment"
    ></vue-video-streaming>
</template>
<script>
import { VueVideoStreaming } from 'vue-video-streaming'
export default {
    components: {
        VueVideoStreaming,
    },
}
</script>

Props

属性说明类型是否必填
videodatas视频数据Array
videodatas[].id视频 idString
videodatas[].postAvatar发布视频者的头像String
videodatas[].nickname发布视频者的名字String
videodatas[].title视频的标题String
videodatas[].description视频的描述String
videodatas[].videoWidth视频的宽度Number
videodatas[].videoHeight视频的高度Number
videodatas[].sourceUrl视频的来源String
videodatas[].poster视频的封面String
videodatas[].upNum视频的点赞人数Number
videodatas[].commentNum视频的评论数Number
videodatas[].isUp视频是否点赞Number是(0 为未点赞,1 为已点赞)
commentList当前视频的评论Array否(可为[])
commentList[].id评论 idString
commentList[].content评论内容String
commentList[].nickname评论人的名字String
commentList[].avatar评论人的头像String
commentList[].createDate评论时间String
commenttotal当前视频评论总数Number
userinfo当前观看用户的信息Object
userinfo.avatar当前观看用户的头像String
userinfo.nickname当前观看用户的名字String
sliderimg视频进度条滑块图片String

Events

事件名说明返回值
uploaddata现有视频播放结束,需根据上一个视频的 id 加载后续的视频id(最后一条视频的 id)
getcomment加载评论videoId(需加载评论的视频 id),page(评论分页加载的页数)
updatecomment评论发送videoId(评论的视频 id),comment(评论的内容)
1.1.0

8 months ago

1.0.15

8 months ago

1.0.14

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago