vue使用Mars3d弹框嵌套video视频/实时视频(flv) 使用jessibuca.js播放器

在html引入jessibuca.js (还需下载decoder.js,decoder.wasm)
http://jessibuca.monibuca.com/player.html 官方下载
<script type="text/javascript" src="./jessibuca.js"></script>

Mars3d弹框嵌套视频播放m3u8前面相同

1.播放flv视频

javascript 复制代码
 data:{
     listOpen: true,
      playing: false,
      isNotMute: false,
      quieting: false,
      fullscreen: false,
      loaded: false, // mute
      speed: 0,
      performance: "", // 工作情况
      kBps: 0,
      btnDom: null,
      videoInfo: null,
      volume: 1,
      rotate: 0,
      vod: false, // 点播
      forceNoOffscreen: false,
      }


  openVideo(item) {
      console.log(5555, item);
      const { addressLongitude, addressLatitude, name, url, poster } = item;
      var position = [addressLongitude, addressLatitude, 1];
      pointEntity == null;
      this.removeDemoLayer();
      // ·····定位到点击的位置开始
      pointEntity = new mars3d.graphic.PointEntity({
        position: position,
        style: {
          color: "rbga(255,255,255,0.1)",
          pixelSize: 0,
          outlineColor: "#F8B55E",
          outlineWidth: 0
        }
      });
      graphicLayer.addGraphic(pointEntity);
      pointEntity.flyTo({ radius: 3400, scale: 28 });
       // ····定位到点击的位置结束  (看需求是否使用)
      const graphic = new mars3d.graphic.BoxEntity({
        position: new mars3d.LngLatPoint(addressLongitude, addressLatitude, 0),
        style: {
          // dimensions: new Cesium.Cartesian3(2000.0, 2000.0, 2000.0),
          fill: true,
          color: "#00ff00",
          opacity: 0.9,
          label: {
            text: name,
            font_size: 19,
            pixelOffsetY: 450,
            horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
            verticalOrigin: Cesium.VerticalOrigin.BOTTOM
          }
        }
      });
      graphicLayer.addGraphic(graphic);
      const inthtml = `<div>
<div style="width: 450px;text-align:center;font-size:15px;">${name}</div>
<div style="width: 450px;height:300px;" class='videoBox' id="videoHLS"  muted="muted" autoplay="autoplay" loop="loop" crossorigin="" controls="">
              </div>
        </div>`;
      graphic.on(mars3d.EventType.popupClose, function(event) {
        console.log("关闭", jessibuca);
        if (jessibuca) {
          jessibuca.pause();
          jessibuca.destroy();
          jessibuca = null;
        }
      });

      graphic.on(mars3d.EventType.popupOpen, function(event) {
        let option = {};
        if (!jessibuca) {
          jessibuca = new window.Jessibuca(
            Object.assign(
              {
                container: event.container.querySelectorAll("[id]")[1],                                                 //jessibuca需要容器
                videoBuffer:1, // 最大缓冲时长,单位秒
                isResize: true,
                loadingText: "疯狂加载中...",
                decoder: "/decoder.js",
                background: poster,
                useMSE: false,
          showBandwidth: false,
          isFlv: true,
heartTimeoutReplay:true,
          hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
          debug: false,
          supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
          operateBtns: {
            fullscreen: true,
            screenshot: true,
            play: true,
            audio: true,
            recorder: true,
          },
          record: "record",
          vod: this.vod,
          forceNoOffscreen: this.forceNoOffscreen,
                isNotMute: this.isNotMute,
          loadingTimeout:30,
              },
              option
            )
          );
          jessibuca.play(url);
        }
      // 刷新局部DOM,不影响popup面板的其他控件操作
      // graphic.on(mars3d.EventType.postRender, function(event) {
      //   console.log(555555)
      // });

      // 绑定Tooltip
      graphic
        .bindPopup(inthtml, {
          offsetY: -30,
          closeOnClick: false,
          autoClose: false
        })
        .openPopup();
    },
相关推荐
AC赳赳老秦2 小时前
农产品公开数据应用:OpenClaw 抓取农产品价格、产销公开数据,实现农产品行情动态监测
java·c语言·javascript·python·php·deepseek·openclaw
全栈技术负责人3 小时前
大模型流式输出核心技术:智能 Markdown 渲染引擎方案
前端·javascript·vue.js
雪芽蓝域zzs3 小时前
第三十四节:用户新增编辑弹窗增加 el‑tree‑select 部门选择器
前端·javascript·vue.js
巴勒个啦3 小时前
如何设计一个高可复用的前端组件库:从API设计到文档自动化
javascript
mONESY3 小时前
一句话是怎么被大模型记住的?——拆解 LangChain.js 消息从诞生到落盘的完整旅程
javascript
奈斯先生Vector4 小时前
AIGC 视频生成换个拍法:用 Kling Video 把一张人物图变成可剪辑的短故事
开发语言·人工智能·windows·python·aigc·音视频
mONESY4 小时前
给大模型装上记忆:Agent 的 Memory 模块,从 InMemory 到文件到 Milvus 向量数据库
javascript
橘子星4 小时前
给 Agent 装上有记忆的"脑子"(一):用 LangChain 打通内存记忆、文件持久化与上下文截断
javascript
光影少年4 小时前
从输入URL到页面渲染,React/RN 整体加载流程
前端·javascript·react native·react.js·前端框架
兔子零10244 小时前
我给 Pi Coding Agent 做了一个桌面控制台:Pi-Harness
前端·javascript·后端