Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何支持audio音频播放 #162

Open
catXiaoXiao opened this issue Jan 18, 2019 · 4 comments
Open

如何支持audio音频播放 #162

catXiaoXiao opened this issue Jan 18, 2019 · 4 comments
Assignees
Labels

Comments

@catXiaoXiao
Copy link

直接传了一个mp3文件路径,发现video标签并未赋值上去,poster也没有了

Expected Behavior【期望行为】

希望能支持audio文件,谢谢

Environment 【相关环境】

版本:0.11.0

@catXiaoXiao
Copy link
Author

额,,我自己修改源码好了,几句代码的事。。
var boxSuffixMap = {
flv: '.flv',
hls: '.m3u8',
native: '.mp4',
mp3: '.mp3',
};

key: 'chooseVideoKernel',
value: function chooseVideoKernel(box, preset) {
switch (box) {
case 'native':
// $FlowFixMe: it's the same as videoKernel
return NativeVideoKernel;
case 'mp3':
case 'mp4':
return this.getMp4Kernel(preset.mp4);
case 'flv':
case 'hls':
return preset[box];
default:
throw new Error('We currently do no

@toxic-johann toxic-johann self-assigned this Jan 18, 2019
@toxic-johann toxic-johann added the feature request request a new feature label Jan 18, 2019
@toxic-johann
Copy link
Member

这是用 video 播放 mp3 么?也可以提 mr 的~

@catXiaoXiao
Copy link
Author

这是用 video 播放 mp3 么?也可以提 mr 的~

video标签是可以播放mp3文件的,就是poster在chrome浏览器下有问题,底部会有一个白色条,好尴尬,只能把poster放在外部了emmmm

@toxic-johann
Copy link
Member

可以先提一个 pr 解决 mp3 问题。如果要引入 audio 组件的话我这边应该也可以做。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants