Use SM2 multiple formats url feature
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 490
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the source code around line 246, where Sound's url propTypes are declared, and trace how the url value is consumed. Verify the documented multiple-format URL behavior with the ["blah01.ogg", "blah01.wav"] example, including loading the second source when the first is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- audio-video-rtc, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100