myf素锦流年 2019-06-06 16:03 采纳率: 0%
浏览 4142

vue项目基于vue-video-player实现rtmp直播流视频一直出不来

以下是我的组件代码:
1、控制台也没有报错
2、更换了几个视频源的路径也没有出来(香港卫视: rtmp://live.hkstv.hk.lxdns.com/live/hks
CEN-中经电视: rtmp://116.213.200.53/tslsChannelLive/PCG0DuD/liveCCTV
证券资讯: rtmp://live.cctvcj.com/cctvcj/live1)
3、修改sources中的type为:type: "rtmp/mp4",还是播放不了
前辈们帮忙分析一下问题出在哪了

<template>
  <div style="width:500px;height:700px;margin:0 auto;">
    <videoPlayer class="vjs-custom-skin videoPlayer" :options="playerOptions"></videoPlayer>
  </div>
</template>
<script>
import "video.js/dist/video-js.css";
import { videoPlayer } from "vue-video-player";
import "videojs-flash";
export default {
  components: {
    videoPlayer
  },
  data() {
    return {
      playerOptions: {
        height: "300",
        sources: [
          {
            type: "rtmp/flv",
            src: "rtmp://116.213.200.53/tslsChannelLive/PCG0DuD/liveCCTV"
          }
        ],
        techOrder: ["flash"],
        autoplay: false,
        controls: true
      }
    };
  }![图片说明](https://img-ask.csdn.net/upload/201906/06/1559807928_528101.png)

};
</script>
  • 写回答

2条回答 默认 最新

  • LPicker 2020-07-08 15:45
    关注

    用的是chrome吧,记住一定要设置浏览器允许falsh,一定要允许,询问是不行的。

    评论

报告相同问题?

悬赏问题

  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备