Code Monkey home page Code Monkey logo

Comments (15)

zhw2590582 avatar zhw2590582 commented on May 23, 2024 2

有道理,我后面再改下这个逻辑

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024 1

@AhJane 假如你是用vue-cli生成的项目,你可以把 flvplayer-decoder-baseline.js 放到你的public目录,然后直接这样,因为webpack改写了静态资源的访问路径,所以导致很容易找不到相对路径。

var flv = new FlvPlayer({
  container: ".flvplayer-app",
  url: "https://flvplayer.js.org/assets/video/weathering-with-you.flv",
  decoder: "flvplayer-decoder-baseline.js",
});

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024

flvplayer-decoder-baseline.js是一个单独文件,Vue是不会把他打包的,你可以相对引用或者绝对引用, 直接decoder填路径就好,注意decoder是从根目录开始查找的,不是你写的那个JS文件开始查找。

new FlvPlayer({
   decoder: 'flvplayer-decoder-baseline.js',
})

from flvplayer.

Hunlongyu avatar Hunlongyu commented on May 23, 2024

carbon (2)
Snipaste

我设置 hasAudio: false
但还是报音频错误

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024

最后有画面输出么,我这个库,音频只支持aac

from flvplayer.

Hunlongyu avatar Hunlongyu commented on May 23, 2024

最后有画面输出么,我这个库,音频只支持aac

没有输出视频画面
bilibili 的 flv.js 的 hasAudio: true 时, 也报错.
但是 flv.js 设置为 hasAudio: false 时,不会报错.

FlvPlayer 的 hasAudio: false 时,报错

from flvplayer.

Hunlongyu avatar Hunlongyu commented on May 23, 2024

话说这个 decoder 的引入方式,可以改变一下吗?
类似这种:
carbon (4)

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024

不能,因为decoder 不是一个普通模块,而是一个worker

from flvplayer.

AhJane avatar AhJane commented on May 23, 2024

也遇到在vue里引入不了decoder的问题,各种路径都试过了,不填使用默认配置也不行。请问作者大大没有其他的引入方式了吗?😂😂

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024

@AhJane 假如你找不到相对路径,那可以直接写绝对路径

from flvplayer.

AhJane avatar AhJane commented on May 23, 2024

@AhJane 假如你找不到相对路径,那可以直接写绝对路径

相对路径、绝对路径都找不到呀😂

from flvplayer.

zhw2590582 avatar zhw2590582 commented on May 23, 2024

@AhJane 截图看看报什么错

from flvplayer.

AhJane avatar AhJane commented on May 23, 2024

@zhw2590582 跟开这个issue的兄弟一样呢
image

from flvplayer.

AhJane avatar AhJane commented on May 23, 2024

@zhw2590582 各种路径组合我都试过了,仍然报这个错呢😭

from flvplayer.

AhJane avatar AhJane commented on May 23, 2024

@zhw2590582 按照你说的这种方法可以找到了,谢谢

from flvplayer.

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.