I've been developing a browser based game using html5 and canvas objects it's going well so far. However i've run across a strange issue that I believe is related to chrome. Basically, the game can play fine for a period of time (this varies, typically a few minutes) then the audio just stops playing. If you then refresh the page or go on any other page with html5 audio tags then the sounds do not play either. If I take a look at the javascript console's network tab in chrome then i can see the audio objects haven't transferred and have a type and status of 'pending'. I've never got an error like this in firefox, only chrome.
My search online for similar situations only found one link that sound similar http://www.lordofultima.com/en/forum/showthread.php?tid=52813 with users complaining about loss of sound in chrome in this game (which is also done in javascript)
Any pointers? Feel free to ask if you need more info.
Just remove id3 tag of mp3 , it's strange but works , at least i hope
Related
I have a question after viewing the way that yt-dl (and its branches) work, it is as easy as requesting a video like any regular user and doing the reconstruction and collecting the whole thing as one file. I have to assert that it is not a superuser question!
Is there a way (even a not mature one) to deal programmatically (I think JS is the only one that I ask for here) with the segments of a video from youtube for example so that we do not need to download the whole video from the beginning if we have watched a video and decided that we want to keep it offline? Assuming that the whole video is still in the RAM (storage tab in the developer's tools)
OS: Windows Browser: Chrome PL: JS
Answers to this question are going to be the seed of a browser extension project
If it is your video, may be. I have seen people segmenting the videos like chapters/parts. If you can do that, you should be able to take part of the video.
I also find this video that explains it:
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwj5i5Oo4oj9AhXBNuwKHWtMAMcQtwJ6BAgKEAI&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuuZZFVMoE_U&usg=AOvVaw0LMgqUzgu9nUzvxe63jQ-m
I have a web page which allows users to select multiple .wav files using the file select button of a form. Each .wav is then displayed using the following markup:
<audio src="blob:f3xyz808-1a65-440e-8e5f-b5djfht4ad1a" controls=""></audio>
This works fine in Chrome and Firefox. In Safari, however, if I try to load too many .wavs at once it stops loading. Using the javascript console I can see that the memory that Safari is using grows with each .wav and can reach upwards of 2GB. With Chrome, memory usage does not increase significantly. So it seems like Chrome and FF stream the files from disk. Is it possible to do this with Safari?
EDIT: It looks like a possible solution to this first problem is to include: preload="none" in the audio tag
On separate but related note: It seems like browsers decode the audio files, at least to some extent, when they are added to an audio tag, because if the file is invalid they complain. Is it possible to access this decoded data without creating an audio buffer in memory. Specifically, I want to create a graph of the files' volume level vs. time. Currently, I do this by decoding the arrayBuffer using the web audio api. This uses a lot of memory. Is it possible to get volume level info from the .wav's raw binary data?
I realize this question has some shortcomings. I am a little vague on some of the concepts.
Any tips or suggestions would be a great help. Thank you.
I was planning on using wavesurfer.js in a project of mine so I checked out the demo on http://wavesurfer-js.org
I dropped a large mp3 file (around 2 hours) onto the middle of the page that asks for a file. It seems to want to load it but after a while Chrome comes up with an error. It doesnt crash, just the tab fails.
With smaller files, single songs, it seems to work ok.
So there seems to be either some limitations with html5 web audio or the websurfer.js library but im not sure. Does anyone have any ideas?
wavesurfer.js GitHub: Large MP3 files cause DOM Exception 12
Sorry that it takes so long to resolve this. From what I managed to google, Safari and Chrome can't decode a large binary due to memory limits.
It looks like it can't be fixed right now, perhaps in the future. They're trying other approaches but without success so far.
I m trying to use the Lamba Labs Beirut Hackerspace 's RPiTv
I have configured my Raspberry Pi for it (Raspibian, node.js, omxplayer, youtube-dl...)
If I download a video and play it in omxplayer, all work fine.
When I try to do it via the node.js app, the video play fine, but there is no audio
The screen is a HP ProDisplay P201 linked by a DVI cable
Audio by a audio casque linked with jack
I can modify the code, but since I m still learning javascript, I d like to avoid it for now.
I m thinking that the lack of audio can come from:
-Is there limitation between omxcontrol and omxplayer? (Is the volume just set to 0 when omxplayer is called, or is there is no audio at all?)
_-In that case, what is the volume control option for omxcontrol, tried google but it seem he don t like me today
-Is it something I made wrong when installing omxcontrol or node.js? (I assume youtube-dl and omxplayer are fine, since it play well when lauched manually)
I know I ask a lot, but even a hint will help.
I figured it out, I just wasn t watching the right code.
I was thinking the problem came from remote.js, but then I saw omxcontrol was starting omxplayer with -o hdmi flag (in omxcontrol/index.js), since the screen didn t had audio output, the audio was lost.
I removed the flag and all work fine.
Hope it can help somebody else.
I'm building content for an iPad app using Cordova. Since the app has already been built and is populated by a CMS, I can't add any extensions or plugins or modules or anything to it (that seems important to mention). The content I'm building is almost entirely video-driven, basically I have a bunch of <video> tags that are triggered by tap events. The videos are all loaded, as I said, from the CMS, not included with the app payload itself.
Most of the time it works fine, but occasionally a video starts playing and will stall about halfway through. My video files aren't very big, they're only about 13 seconds long, ~700kb or so each.
When a video stalls, the following error is logged to the console:
Took background task assertion (5) for playback stall
Ending background task assertion (5) for playback stall
The number in brackets will vary.
I haven't got a scooby as to what this means, and I'm pretty much a complete novice when it comes to the Xcode/Cordova world – Front-end dev is my thing, but the Cordova world is new to me. I can't figure out what's causing it, it seems to be random. I'm assuming it's possibly a bitrate/bandwidth thing, but that doesn't make sense because when a video is triggered, I'm detecting it's readystate in order to wait for it to load in before playing, so theoretically it should be fully-loaded before it starts playing.
Any solutions or tactics to try out? I'm kind of at a loss, and the internets and googles aren't being overly helpful when searching for that particular error message.
If the problem is the loading, a nice trick in Cordova is trying to set it in a (small) timeOut, so that the rest gets loaded before the video. As mentioned above, the readtyState option isn't always reliable.