audiojs | A cross-browser javascript wrapper for the html5 audio tag | Audio Utils library
kandi X-RAY | audiojs Summary
kandi X-RAY | audiojs Summary
A cross-browser javascript wrapper for the html5 audio tag
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of audiojs
audiojs Key Features
audiojs Examples and Code Snippets
Community Discussions
Trending Discussions on audiojs
QUESTION
I'm trying to create a player that shows player in another div and fetching the src of HTML5 audio element from the "a" attribute, everything is working fine but when I pause the audio and then play it again, then instead of resuming it restarts the audio.
Here is my code:
...ANSWER
Answered 2021-Aug-20 at 07:05The problem is that you override audio src when you pause and play again.
Try to check if src exists and it is the same was playing before paused it.
if(audio_pbar.src !== datasrc) audio_pbar.src=datasrc;
QUESTION
I use VLC media player to stream some content (audio). Right now I stream it to port 80 (http) of my PC. On a different device I open VLC and can listen to the stream by using http://192.168.0.78/ (the IP of the source computer). It plays well also on a phone when I use the VLC app to listen to the content.
Now, I try to implement a player on a website which takes the url of the stream as src
and the client just opens the website and plays the stream (this has many logistic advantages). A minimal example can be viewed here. The stream runs fine on Desktop browsers but does not on run on mobile browsers. Unfortunately there is no error message or things like that which could indicate the source of the problem.
Things I tried to do:
- Using different encodings of the stream in the VLC (MP3, OGG etc.)
- Using third party HTML players like Media element, jPlayer, audio.js, Muses Radio Player and many more. All of them work fine on desktop browser, but buggy, if at all on mobile browsers
- It works on a Desktop browser when simulating a mobile browser thought F12 -> Responsive Design mode (in Firefox for example)
The site, in which I host the player runs on https, whereas the source of the stream is http. At this point I am not aware of a problem this could cause, but still mentioning it here.
Does anyone have experience with HTML players on mobile devices which take a stream as source?
...ANSWER
Answered 2020-Jul-15 at 18:42The site, in which I host the player runs on https, whereas the source of the stream is http. At this point I am not aware of a problem this could cause, but still mentioning it here.
That is in fact the problem. If you open up your browser's developer tools, you will see error messages related to this. Pages in secure contexts can no longer load data from an insecure context.
Ideally, you need to serve your stream via HTTPS. Otherwise, you'll have to serve your page via HTTP.
Also note that you do have this same problem on desktop browsers.
QUESTION
I'm recording audio from nodejs using node-microphone (which is just a javascript interface for arecord), and want to store the stream chunks in an AudioBuffer
using web-audio-api (which is a nodejs implementation of the Web Audio API).
My audio source has two channels while my AudioBuffer
has only one (in purpose).
This is my working configuration for recording audio with arecord through my USB sound card (I'm using a Raspberry pi 3 running on Raspbian buster):
...ANSWER
Answered 2020-May-15 at 19:43So the input stereo signal is coming as 16 bits signed integers, interleaving left and right channels, meaning that the corresponding buffers (8 bits unsigned integers) have this format for a single stereo sample:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install audiojs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page