#WaveSurfe.js doesnt loading
101 messages · Page 1 of 1 (latest)
I have no idea what you are doing, nor why this is an Angular question. Seems like you have a problem with permissioning on your server.
no
I wanna show wave form of the sound
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> -->
<title>BeatZoneTr</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="https://www.beatstars.com/assets/img/bs-logos/bs-logo-red.svg" />
<script src="https://unpkg.com/wavesurfer.js"></script>
</head>
<body class="background-index">
<app-root></app-root>
<div style="
margin-top: 2rem;
background-color: #454d55 !important ;
height: 100px;
color: white !important;
text-align:center ;
">
WaveSurfer
<div id="waveform" style="
background-color: #4da6ff !important ;
height: 100px;
"></div>
</div>
<script>
var wavesurfer = WaveSurfer.create({
container: "#waveform",
waveColor: "violet",
progressColor: "purple",
});
wavesurfer.load("../../../assets/audios/cairo.wav");
</script>
</body>
</html>
this workıng but
when ı write this code <script src="https://unpkg.com/wavesurfer.js"></script>
<div style="
margin-top: 2rem;
background-color: #454d55 !important ;
height: 100px;
color: white !important;
text-align:center ;
">
WaveSurfer
<div id="waveform" style="
background-color: #4da6ff !important ;
height: 100px;
"></div>
</div>
<script>
var wavesurfer = WaveSurfer.create({
container: "#waveform",
waveColor: "violet",
progressColor: "purple",
});
wavesurfer.load("../../../assets/audios/cairo.wav");
</script>
in my player.component.html
the code doesnt work
g!codeblock
@stoic rover, you can use the following snippet to have your code formatted and colored by Discord. Replace ts with the language you need (i.e. html, js, css, etc)
```ts
// your code goes here
```
/assets is a root level folder. You never need a relative path like ../assets. Just do /assets because it is a folder at the root of your app.
okay
And using non-Angular-ized JS is difficult. you likely are going to need to wrap it in Angularisms to make it work.
You cannot add <script> to Angular template.html files. That does not work.
It didn't work either when I added the script file to index.html and wrote the rest to component html.
What does "it didn't work" mean?
look for error messages?
Developer Tools failed to load source map: Failed to load content for https://unpkg.com/wavesurfer.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
ı looked
@stoic rover
I can moderate your own content but unlikely what you need: please don't use tags widely like that.
That's Saturday today (small traffic) and you are providing small screenshots with foreign language.
Help yourself if you want some help.
So how would you suggest I do this wawe form thing?
I don't know anything about Wavesurfer but wavesurfer angular on Google Search provides good answers to avoid using native js scripts, as advised by Rob.
like a dedicated angular wrapper.
A wrapper is a solution acting as an adapter between the native solution (wavesurfer) and the solution consuming it (angular).
It makes it easier to use and avoid such a current situation.
With previous google search advice you'll find as a first result a dedicated nom library to use in place of js scripts
I already download it with npm
npm i wavesurfer.js
No you have not
I'm giving you advices about using Google search for wavesurfer angular and that's not what you will get
this error isn't important, BTW. it's for the Source Map file. It's nice for debugging, but doesn't impact the actual functionality.
https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html
if it's not important why is it not working 😢
for some other reason
likely because, as two people have told you. You need an Angular wrapper to make this work.
ok I am gonna search this
Don't hesitate to take a break, sometimes it's hard to take a fresh eye on a problem.
Don't try to fix your situation, focus on the solutions availables.
I just started the software and I've been trying since morning to solve the problem. Thank you very much for your support
❤️ ❤️
The first thing to learn is when you are using two things you should do a web search for those two things. 🙂
ok sir!
restart your editor. it may not have noticed the new install. Assuming you did install it
same
how can ıt be possible
ı deleted the angular-wawesurfer-service
than ı tried re-upload it
now ı got error
Version 14 is not Version 11.
what
Last publish
a year ago
You have version 14 of Angular. That library wants v11 of Angular. 11 is not 14.
Last published a year ago means that this package is not very actively maintained.
A lack of a link to a repository means that the package isn't one I would consider for my app
You will likely have to make your own then
ı cant
I cannot do everything at once. i have to use this package to save time
You are saving time? 🤣
Likely you won't need many changes. Just copy the files from one of the repo into your app
But you should read the code and understand what it does and how it works. This is the life of a developer
ro
whats gonan happen
if ı delete my angular version
and upload angular 11
Is there any chance my project won't open?
going backwards generally isn't the best direction IME