Comments (2)
Some notes of what I got so far.
TL;DR: still no viable solution.
In the demo app once the local media is uploaded we create an object url and pass that to the component.
const fileURL = URL.createObjectURL(file);
So I was looking to see if we could use the file name(as this would not change π€and should allow us to retrieve the corresponding transcript from local storage on page refresh) instead of the blob url, without having to pass it to the component.
after a bit of exploration I had figured out that you can convert an object url back into a blob
var blob = null;
var xhr = new XMLHttpRequest();
xhr.open("GET", window.fileURL); // `window.fileURL` is the url to convert
xhr.responseType = "blob";//force the HTTP response, response-type header to be blob
xhr.onload = function()
{
blob = xhr.response;//xhr.response is now a blob object
}
xhr.send();
However the problem is that a blob by its nature only has two attributes, size
and type
{size: 85047555, type: "video/mp4"}
as explained here on stackoverflow you could then convert this into a file
var file = new File([blob], "name");
But it doesn't seem possible to get the original file name of an object url even after converting it to a blob as it is not stored in the blob.
from react-transcript-editor.
fixed in this PR #72
from react-transcript-editor.
Related Issues (20)
- Add property to disable auto save HOT 1
- Empty transcription causes error for digitalpaperedit transcripts
- Media player component in story book is broken HOT 1
- could remove unnecessary files from npm packaging
- handleAutoSaveChanges function is not getting triggered when editing text(NPM package) HOT 2
- How to Show difference In EditedText and Old Text which was previously supported by bbc react editor? HOT 1
- Support for Amazon Transcribe format for multiple channels (not the same as speakers) HOT 2
- How to use IsEditable in [email protected]+ HOT 1
- Default key bindings not working on Editor
- Updating documents
- Demo doesn't seem to support WAV files HOT 6
- Showing "TypeError: Cannot read property 'blocks' of undefined" HOT 6
- edit able not work i can not edit text HOT 7
- Bug: unexpected scroll behavior after edit on long transcript HOT 4
- Should we expect new releases?
- Stt Spanish and ui spanish I want collaborate
- How to Start Audio on dynamic time
- handleAutoSaveChanges function is not getting triggered when editing text(it shown page unresponsive error)
- Can anybody tell me the way to get this app to work, and whether it can.
- How I can use the Azure batch transcript service?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-transcript-editor.