Vuejs Error while loading mediainfo.js package - javascript

We have one we application where we record video for 30sec or 1 min and submit to server. The device can be anything.
When we do record from laptop for 30sec the size of the video is 60mb, if from latest iphone size is 180.
Our server loads video if the video size is less than 60mb
to fix this issue, i tried compressing video in front end using this example enter link description here which uses vuejs.
We are using vuero framrwork.
Tsubasa enter link description here using mediainfo.js package. I followed same code but i am facing this issue..
The issue is :
MediaInfoModule.wasm net::ERR_ABORTED 404 (Not Found)
Could not load content for http://localhost:3000/node_modules/mediainfo.js/src/mediainfo.ts (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)
Please check screenshot
My nodemodule structure as below, plugin we have added in vite.config.ts file
I researched on this issue try to fix but no luck.

It's not possible to tell exactly what you need to change as we don't see the relevant code.
Make sure the file MediaInfoModule.wasm can be loaded in the browser. Check the browsers network tab. It tells you where your frontend expects the file.
Note, that you can also set the file location explicitly using locateFile as shown in this example.
Disclaimer: I'm the author of mediainfo.js.

Related

Getting JSON from a website with no visible files using p5.js

I am trying to import a json file from a website using p5.js, and i thought it would be quite easy, however when i tried it i realized the json was actually just in plain text on the page (It is the only thing on the page). I checked chrome web tools to look at index.html, but i was greeted by "(index)", is it a problem with google or am i just going to have to use something else than this?
function preload() {
httpGet('leaderboard.popcat.click', 'json', function(response) {
});
}
//there are the setup and draw functions aswell
I got an error when i ran the code aswell, it was
Error: JSONP request to url failed
here is a picture of the page btw, (the url is leaderboard.popcat.click)
EDIT: The main problem i am having is that there is no file in https://leaderboard.popcat.click/, not the getting of json.
The network tab says no such url exists, and i believe that is because of the fact that i didn't specify a file.
Here is the console output aswell
I solved my issue by starting chrome in no-cors mode or whatever it's called AND using the full path of the website. I got it into no-cors mode by making a shortcut with this link
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir=~/chromeTemp"
and running it as an administrator

http load failed with status 416

I create elearning courses, and I'm having a very persistent loading issue with one of the courses I've been working on.
When I run my files through the debugger, this error comes up:
"Invalid URI. Load of media resource failed."
Followed by this error for each .mp4 file in the course:
"HTTP load failed with status 416"
This reflects the problems that we're seeing on the front end - issues with the videos in the course not preloading, and causing blank spaces or causing the entire course to stall.
Does anyone know if these are issues with my html file, or on the server side? Any suggestions?
Here is the link:
http://files.foodallergy.org/video-library/storyline/RecognizingandRespondingtoAnaphylaxis/story_html5.html
Thanks!
I've not seen that error before on a Storyline file. The error 416 suggests that the media file hasn't downloaded properly before its playback is started. If I return to the course, then the video plays correctly. Storyline does not stream media so it has to download them completely first.
Try delaying the start of the video/sound clip by say 2 seconds on the slide. This should give it enough time to download.
If you don't like the gap, then it could be covered with a fade-in slide transition or similar.

Pimcore: Getting the White-Screen-of-Death after successful admin login

I've installed Pimcore on a VPS through Liquid Web. I loaded the sample data install which also uses the nightly build code. While everything installed fine, the public facing website appears fine and functions well, as does the login screen for the admin panel, once you log in, you see three black pulsing dots in the middle of a white screen, where eventually they disappear and you're simply left with a white screen.
Upon inspection of the error console, I'm seeing this error:
Failed to load resource: the server responded with a status of 404 (Not Found)
/website/var/tmp/minified_javascript_core_b18dd1d6984052da2ab5abc79f0c4a17.js?_dc=3704
Other scripts are also failing because this script isn't being loaded, so I'm fairly sure that once this script loads the others will work just fine.
When I try to directly access this JS file, I see this message:
HTTP/1.1 404 Not Found Filtered by error handler (static file exception)
I have verified that the file exists in the filesystem, so I know for sure that it's there, leading me to believe that the filesystem has that directory and/or file locked down. Permissions etc, are all set to their appropriate values.
Pimcore Version 4
It's been a few years and this project surfaced in our pipeline again. The actual cause for why this breaks was because we are also running the ModSecurity suite on our host. Accessing the interface .js file was triggering rule 2000009 where the pattern /var/tmp was being matched.
Possible solution (if you're using WHM/CPanel as we are):
Configure your /etc/apache2/conf.d/modsec2/whitelist.conf file to include the following rule (add more in the same place if needed).
<LocationMatch '/website'>
SecRuleRemoveById 2000009
</LocationMatch>
Be sure that you restart your HTTP service after making this update.
Enjoy!

Magento install copied - admin menu doesn't work

I cloned an existing magento 1.7.2 installation on the same server with a test subdomain. The frontend seems to work, and I can login to the admin. The admin menu doesn't work however, no dropdowns, and copying url paths doesn't work either. I've searched online, and most answers date back to 2008 and suggest that it's a rights issue. So I've changed the rights of folders and files to 755 and 644, but still no working menus. The cache (var/cache) is empty.
These menus are javascript generated. The following error message is from the console:
Error: TypeError: Element.addClassName is not a function
To be clear - the solution is not in javascript, but it's something on the server. This install works on the same server in another directory with another domain.
Any ideas how to fix this?
The error
Error: TypeError: Element.addClassName is not a function
indicates some javascript on your page can't call the addClassName method.
The addClassName method is added to element via the prototype javascript framework.
That means its very likely your browser can't download the prototype.js file. Since it can't download this file, the addClassName method is never defined, and you get the error you're seeing.
Look at the source code of your admin pages and find the script tag that includes the version of prototpye shipped with your version of Magento.
<script type="text/javascript" src="http://magento.example.com/js/prototype/prototype.js"></script>
Take the URL from this script tag and load it in your browser.
My guess is you'll get a 404 because the file is missing, or a forbidden error because the file has incorrect permissions, or some other web server error that prevents the file from being shown. It's also possible that the link is pointing to an older domain name that's based on a value configured or cached in Magento.
Track down the source of that problem, and you'll be good to go.
Another reason could be that the skin and CSS rules are not correct for your environment.
I've just moved a site from live to local, and the skin/css/media were configured to a subdomain so I looked in the core_config_data table and updated the URLs
Please check if you have set merge js or css to yes, you can update this via db if you cant do it via menu:
SELECT * FROM core_config_data WHERE path LIKE 'dev%'
Change from 1 to 0 merge_css and merge_js
In my case I have changed the permissions of folder and its recurring files and folder and it started working. Try it once.

Media Source Api not working for a custom webm file (Chrome Version 23.0.1271.97 m)

I am referring a media source api demo given on this link
It is working fine for the given test webm file but when i tried to change the name of the file to a custom webm file the code stopped working.
It is generating following error : Uncaught Error: INVALID_STATE_ERR: DOM Exception 11 at following code : sourceBuffer.append(new Uint8Array(e.target.result));
To check whether the custom webm file is working i have created a test page in which i have defined a video tag having source of that custom webm file.
When i ran the code it is working fine.
I am unable to understand the reason for this strange behavior.
The most likely problem is your WebM file has Clusters that don't start with a keyframe.
In Chrome dev-channel builds (ie Chrome 25 or later), you can verify this with the following steps.
Open chrome:media-internals in another tab.
Return to the tab with your test page and reload it.
When the error occurs again, switch back to chrome:media-internals tab and look for the bottom entry under the "Active media players:" header. It should have the same blob: URL that you passed to the video element src attribute.
Click on the blob: URL to expand the player data.
Click on the "Log:" entry to expose the player logging data.
Search for entries that have "MEDIA_SOURCE_ERROR" in the "Event:" column. These entries should provide information about what is wrong with the content passed to the browser.
If you see a message that says something like "Media segment did not begin with keyframe." then it means your file has Clusters that don't start with a keyframe. This is common with content that is generated by FFmpeg. You can fix your file in one of the following ways:
Run the sample_muxer program mentioned in section 2.2.5 of the WebM adaptive streaming guide
Run the mse_webm_remuxer program I wrote as part of my mse-tools project.
UPDATE: no internal error shown in my case (accepted answer suggests to check) but still the same problem
I ran into the same trouble when trying to play recorded .webm file by MediaRecorder API back using Media Source Extensions (MSE). Chrome (51) recordings are malformed, Firefox (46) seems OK.
To get it working you have to fix cues in .webm file:
clone https://github.com/webmproject/libwebm
make sure you have cmake version >= 3.2 (https://askubuntu.com/questions/610291/how-to-install-cmake-3-2-on-ubuntu-14-04)
cmake .
make
./sample_muxer -i original.webm -o fixed.webm
load fixed.webm into DASH / your own player!
Hope it helped someone. It was quite difficult to google any information without the DASH keyword (i am not using DASH, only the same underlying technology - MSE) :)

Categories