更新记录

1.0.5(2024-09-01)

-

1.0.4(2024-09-01)

-

1.0.3(2024-09-01)

-cs

查看更多

平台兼容性

HbuilderX/cli最低兼容版本
3.1.0

uni-app

Vue2 Vue3
?
app-vue app-nvue app-android app-ios app-harmony
? ? ? ? ?
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
? ? ? ? ? ? ? ? ?
微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序 钉钉小程序 快手小程序 飞书小程序 京东小程序
? ? ? ? ? ? ? ? ?
快应用-华为 快应用-联盟
? ?

uni-app x

app-android app-ios
? ?
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
? ? ? ? ? ? ? ? ?

hg-video-cover

<template>
    <view>
        <view class="content">
            <view>
                <text>网络视频封面https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4</text>
            </view>
            <!-- <hg-video-cover></hg-video-cover> -->
            <view>
                <image :src="imgPath1" mode="aspectFill"></image>
            </view>
            <button @click="getUrlPath">获取</button>
            <hg-video-cover :url="video1" @success="imgPath1=$event"></hg-video-cover>
        </view>
        <view class="content">
            <view>
                <text>本地视频封面</text>
            </view>
            <view>
                <image :src="imgPath2" mode="aspectFill"></image>
            </view>
            <button @click="choose">获取</button>
            <!-- <hg-video-cover :url="video2" @success="imgPath2=$event"></hg-video-cover> -->
        </view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                imgPath1: '',
                imgPath2: "",
                video1: '',
                video2: ''
            };
        },
        methods: {
            getUrlPath() {
                this.video1 = {
                    src: 'https://qiniu-web-assets.dcloud.net.cn/video/sample/2minute-demo.mp4',
                    width: 150,
                    height: 100
                }
            },
            choose() {
                uni.chooseVideo({
                    sourceType: ['camera', 'album'],
                    success: (blod) => {
                        this.video2 = {
                            src: blod.tempFilePath,
                            width: 100,
                            height: 100
                        }
                    }
                })
            },
        }
    }
</script>
<style lang="scss">

    .content {
        margin-top: 30rpx;
        display: flex;
        flex-direction: column;
        // align-items: center;
        // justify-content: center;
        gap: 30rpx;

        >view {
            display: flex;
            align-items: center;
            justify-content: center;

            >image {
                width: 200rpx;
                height: 200rpx;
                background: rgba(22, 22, 22, 0.5);
            }

            >text {
                font-size: 24rpx;
                text-align: center;
            }
        }

    }
</style>

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问