Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Added logic to support all audio formats in the player #4676
Added logic to support all audio formats in the player #4676
Changes from 2 commits
26789bf
7dd0c31
8b03952
5f7d251
77ec466
ffc638e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
questionPath
isundefined
, this will crash the app.Steps to break it:
simple-audio-form.xlsx
flac
file (e.g. https://github.com/ietf-wg-cellar/flac-test-files/blob/main/subset/01%20-%20blocksize%204096.flac)400
error on this:GET http://kf.kobo.local/api/v2/assets/aJpiarEu6gxjLrg7wuXpDq/data/34/attachments/?xpath=undefined&format=mp3
and another error:Uncaught (in promise) DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but perhaps
Object.keys
above should beObject.values
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this problem is because when you upload the file it gets renamed by removing the '_' in the file. Unfortunately it's not as simple as just replacing the
_
with spaces because it only does it for the original file name but numeric values are getting added to the end of the file and that is our new file name.For example:
We upload:
01 - blocksize 4096.flac
The attachment file name is
01_-_blocksize_4096-12_47_9.flac
The question value is:
01 - blocksize 4096-12_47_9.flac
Additionally if the file name has a
-
originally that does not get removed, only the spaces that were replaced with the hyphen.We were comparing the file name to the question value in order to get the question path name but clearly that doesn't work when the name of the file is changing between the file name and the actual value of the question file.
I'm working on the solution now. Stay tuned