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

Use SM2 multiple formats url feature #68

Open
iuriizharkov opened this issue Sep 12, 2018 · 0 comments
Open

Use SM2 multiple formats url feature #68

iuriizharkov opened this issue Sep 12, 2018 · 0 comments

Comments

@iuriizharkov
Copy link

Thank you for the great component, does its job really well.

I was trying to specify the url parameter in multiple formats as mentioned in
http://www.schillmania.com/projects/soundmanager2/doc/#smsound-url and unfortunately failed to do that.

My first guess was updating the propTypes in the source code. So on the line 246 instead of

  url: _propTypes2.default.string.isRequired,

I put

  url: _propTypes2.default.oneOfType([
    _propTypes2.default.string,
    _propTypes2.default.array
  ]).isRequired,

The test showed that the code, in fact, does not seem to cope with the multiple formats. I was trying ogg and wav like so <Sound url={["blah01.ogg", "blah01.wav"]} /> and it worked for the first file in the array. Then I renamed the first file on the server and the second wasn't loaded.

Could you please help me making it work.

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

No branches or pull requests

1 participant