岄. 2024-05-09 14:25 采纳率: 91.7%
浏览 29
已结题

如何解决?(标签-ide)


<template>
    <div class="box">
        <easy-player live muted autoplay :video-url="src" style="width: 100%;height: 700px;"  @error="restartPlayer" :id="id" :has-audio="false" ref="easyPlayer" :video-title="title" />
        <p>yfhed</p>
    </div>
</template>
 
<script>
import EasyPlayer from '@easydarwin/easyplayer'
 
export default {
    components: {
        EasyPlayer
    },
    props: {
        src: '../../static/ch1.mp4',
        id: 1,
        title: '1',
       
    },
    data() {
        return {
            player: null
        }
    },
    watch: {
 
    },
    computed: {},
    mounted() {
       
    },
    methods: {
        
    },
  
 
 
}
</script>
<style lang="scss" scoped>
.box {
    width: 100%;
    height: 100%;
}
 
//视频进度工具栏的样式
::v-deep .vjs-live-display{
    line-height: 50px;
}
::v-deep .vjs-bitrate-control{
    line-height: 50px !important;
}
::v-deep .icon-luxiang2{
    display: none !important;
}
::v-deep .vjs-snapshot-control{
    display: none !important;
}
::v-deep .video-title{
    font-size: 14px;
    left: 5px !important;
    right: 0px !important;
    max-width:200px !important;
}
::v-deep .vjs-stretch-control{
    display: none !important;
}
::v-deep .vjs-icon-placeholder:before{
   font-size: 30px !important;
   line-height: 40px;
}
::v-deep .easy-player-loading{
    display: none !important;
}
</style>

报错videojs is not defined"

  • 写回答

2条回答 默认 最新

  • 专家-皆知 2024-05-09 14:25
    关注

    引自免费微信小程序:皆我百晓生

    请检查easy-player组件的语法和视频URL是否正确,确保muted属性用于静音,live用于直播。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 5月9日
  • 已采纳回答 5月9日
  • 创建了问题 5月9日