Skip to content

If initialising component with Transcript first and then Media local storage save/retrieve does not work #87

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

Closed
2 of 3 tasks
pietrop opened this issue Jan 23, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@pietrop
Copy link
Contributor

pietrop commented Jan 23, 2019

Describe the bug
A clear and concise description of what the bug is.

The component at a minimum needs two params to function properly and to be able to save to local storage:

  • media mediaUrl
  • transcript transcriptData (+ type)

as background saving to local storage uses the media url as a key.

  • Providing both at the same time <-- works

  • Providing first media then transcript <-- works

  • First transcript then media <-- breaks

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://bbc.github.io/react-transcript-editor/
  2. Click on 'choose file' next to 'open Transcript Json'
  3. Click on 'choose file' Load Local Media'
  4. Click on text and edit, (add more then 5 char)
  5. refresh page
  6. repeat 1-5 and see the text added in step 4 is present
  7. if not, then this is the error

Expected behavior
A clear and concise description of what you expected to happen.

It would be preferable if the component could handle local storage save even if transcript is provided before the media is passed to it.

Additional context
Add any other context about the problem here.

Possible solution if Media not defined then transcript should wait to load until media is. Binding TranscriptEditor component to only work if both are present. this would also address #85

@pietrop pietrop added the bug Something isn't working label Jan 23, 2019
@pietrop pietrop self-assigned this Jan 23, 2019
@pietrop
Copy link
Contributor Author

pietrop commented Jan 24, 2019

fixed in PR #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant