Code Monkey home page Code Monkey logo

Comments (1)

zhaoyingzi avatar zhaoyingzi commented on June 30, 2024

aliplayercomponents 1.0.8版本,挂载弹幕组件报错 a.CommentManager is not a constructor,播放器无法使用。

官网在线功能演示弹幕功能也无法使用

image

<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.11.0/skins/default/aliplayer-min.css" />
<script charset="utf-8" type="text/javascript" src="https://g.alicdn.com/de/prismplayer/2.11.0/aliplayer-h5-min.js"></script>
<script type="text/javascript" charset="utf-8" src="/aliplayercomponents-1.0.8.min.js"></script>
var player = new Aliplayer({
  id: "player-con",
  source: "//player.alicdn.com/video/editor.mp4",
  width: "100%",
  height: "500px",
  cover: 'https://img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg',
  /* To set an album art, you must set 'autoplay' and 'preload' to 'false' */
  autoplay: false,
  preload: false,
  isLive: false,
  components: [
    {
      name: 'AliplayerDanmuComponent',
      type: AliPlayerComponent.AliplayerDanmuComponent,
      args: [{
        "mode": 1,            // mode 表示弹幕的类型,参考 弹幕类型 https://github.com/jabbany/CommentCoreLibrary/blob/master/docs/CommentTypes.md
        "text": "test",       // text 表示弹幕的文字内容。注意:在创造弹幕对象后,对 text 的更改将无意义。
        "stime": 1000,        // stime 表示弹幕相对于视频位置的开始时间(ms),0即在视频开始立即出现
        "size": 25,           // 弹幕的文字大小
        "color": 0xffffff     // 文字颜色
      }]
    }
  ]
}, function (player) {
  console.log("The player is created");
});

请下载新的1.0.8版本的组件,我做了修复

from aliyunplayer_web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.