Giter VIP home page Giter VIP logo

Comments (9)

AimLuo avatar AimLuo commented on May 28, 2024

😂react-swf尺寸小于400*300的视频不能自动播放

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 28, 2024

这个限制是浏览器对flash的限制,两个问题等我手头事情忙完了补充到 FAQ 中

from reactjs-player.

AimLuo avatar AimLuo commented on May 28, 2024

用video.js的flash也不能播放,并且告警:
image
我使用了第三方编译的swf文件,就可以了。
自编译
里面有个图片丢失,这里补上
image

下载地址下载那个播放器,里面的liveplayer.swf
image

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 28, 2024

那可能是 GrindPlayer 的限制,我一直以为 flash 都是这样的呢😥

from reactjs-player.

AimLuo avatar AimLuo commented on May 28, 2024

浏览器安全设置就是小于这个尺寸的视频不能自动播放,但是有些例外:
原生video,设置静音就能自动播放。

<video autoPlay muted loop style={{
  height: 165,
  width: 309,
  display: 'block',
  backgroundColor: 'black',
  objectFit: 'fill'
}} src='foo.mp4' />
  • falsh需要研究,自行编译react-swf的swf文件,实现小尺寸自动播放

另外音频audio,可以用一段空白音频实现自动播放。

const audioIframe = document.createElement('iframe')
audioIframe.allow = "autoplay"
audioIframe.style = "display:none"
audioIframe.src = `foo/voice/empty.m4a`
document.body.appendChild(audioIframe);

然后在代码中播放其他带声音的音频

from reactjs-player.

AimLuo avatar AimLuo commented on May 28, 2024

empty.m4a空白音频可以用window10的录音机录制,此时可以将耳机插入话筒孔,实现空白录制。
建议用m4a格式,优点请自行查询。

from reactjs-player.

AimLuo avatar AimLuo commented on May 28, 2024

那可能是 GrindPlayer 的限制,我一直以为 flash 都是这样的呢😥

videojs的flash也限制了,需要自己编译swf才行。

from reactjs-player.

xiaosongxiaosong avatar xiaosongxiaosong commented on May 28, 2024

自动播放

这个项目目前没有强制做自动播放的计划,打开页面自动播放在我看来并不是最好的体验

flash

grindplayer 是目前用户的 flash player 中体验比较好的,接口和文档都比较不错,现在已经在抽时间封装 grindplayer ,也没有替换的打算

from reactjs-player.

AimLuo avatar AimLuo commented on May 28, 2024

flash 已死,不要浪费时间去研究 flash` 了。

from reactjs-player.

Related Issues (8)

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.