Comments (9)
😂react-swf尺寸小于400*300的视频不能自动播放
from reactjs-player.
这个限制是浏览器对flash的限制,两个问题等我手头事情忙完了补充到 FAQ 中
from reactjs-player.
用video.js的flash也不能播放,并且告警:
我使用了第三方编译的swf文件,就可以了。
自编译
里面有个图片丢失,这里补上
下载地址下载那个播放器,里面的liveplayer.swf
from reactjs-player.
那可能是 GrindPlayer 的限制,我一直以为 flash 都是这样的呢😥
from reactjs-player.
浏览器安全设置就是小于这个尺寸的视频不能自动播放,但是有些例外:
原生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.
empty.m4a空白音频可以用window10的录音机录制,此时可以将耳机插入话筒孔,实现空白录制。
建议用m4a格式,优点请自行查询。
from reactjs-player.
那可能是 GrindPlayer 的限制,我一直以为 flash 都是这样的呢😥
videojs的flash也限制了,需要自己编译swf才行。
from reactjs-player.
自动播放
这个项目目前没有强制做自动播放的计划,打开页面自动播放在我看来并不是最好的体验
flash
grindplayer 是目前用户的 flash player 中体验比较好的,接口和文档都比较不错,现在已经在抽时间封装 grindplayer ,也没有替换的打算
from reactjs-player.
flash
已死,不要浪费时间去研究 flash` 了。
from reactjs-player.
Related Issues (8)
- flv播放失败 HOT 7
- 华为手机微信同层播放显示异常 HOT 5
- 缺少swf解析模块 HOT 3
- 使用 useReducer 代替 useState 做状态管理 HOT 1
- GrindPlayer 需要支持 ReactPlayerContext HOT 1
- package.json 配置文件的问题 HOT 1
- 一点就黑屏, native方式播放mp4 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactjs-player.