免费WEB播放器LivePlayer.js如何自适应div宽高集成播放视频

LivePlayer网页直播、点播播放器

资源下载:https://www.liveqing.com/docs/download/LivePlayer.html
使用说明:https://www.liveqing.com/docs/manuals/LivePlayer.html

根据DIV宽高自适应显示播放

<body>
    <div class="dydiv">
        <live-player video-url="http://localhost:10080/vhls/562vgkMZR/562vgkMZR_live.m3u8" aspect="fullscreen">
        </live-player>
    </div>
</body>
<style>
    .dydiv {
        position: relative;
        height:500px;
        width: 400px;
    }
</style>

设置拉伸铺满显示效果

<body>
    <div class="dydiv">
        <live-player video-url="http://localhost:10080/vhls/562vgkMZR/562vgkMZR_live.m3u8" aspect="fullscreen"  stretch="true">
        </live-player>
    </div>
</body>
<style>
    .dydiv {
        position: relative;
        height:500px;
        width: 400px;
    }
</style>

posted @ 2019-07-26 13:09 Kim的博客 阅读(...) 评论(...) 编辑 收藏