I have implemented custom sound for push notifications in wp8. Everything works fine , but the custom sound file is not played completely (when app is in background). the sound file is 8 seconds and meets requirements. can someone let me know why the sound file is not played completely ?
Related
Adobe Animate cc 2017 - HTML5 freezes when I publish/test project with audio
I'm working on a small game, using Animate 2017 and exporting it to HTML5. I'm using createjs.Sound to add the sound fx I've added to the library. When I publish or "test" the project, it freezes the loading bar. On OSx it stays at 0%, on windows it goes up to 70% but freezes anyway. The only option being to force quit the app. I'm following a tutorial from Pluralsight, and I've tested the tutor's project and I get a slightly different issue, the project gets published, the browser starts everything automatically but nothing happens afterwards, instead of the game starting, it just stays a black canvas (no errors in the console).
A few more data to help troubleshoot, the tutor's project is using .mp3 files and I'm using .wav audio. I've been trying to look through the OSX auto generated error report, but I can't make heads or tails of what it says.
Animate mac/windows version - 2017.0.1 Release (16.0.1.119)
Turns out it was a corrupted symbol or something that was causing the program to crash. Converting the project to ActionScript 3 and then back to HTML5 solved the issue.
https://forums.adobe.com/thread/2425008
If anyone experience a AnimateCC crash issue in Mac, It might be an issue with long audio file name. I found that if the audio file name is greater than 29 characters, AnimateCC crashes when publishing. Here is a sample test file.
https://drive.google.com/file/d/1dEBdM4laszCXFa3Bz4tS3yHh-8PbLaGo/view?usp=sharing
As you can see, the file crashes when you try to export. It has only one sound file in the library. When you remove one character in the file name, it gets published successfully. I tested this in AnimateCC version 18.0.2 (Build 126).
I'm making a game that changes some of it's object depending on what music is playing. After each song has ended I want my audio context to load in a new source and analyze that. However whenever I tried to do that I've gotten the error that an audio object or buffer can't be called twice.
After some researching I learned that ctx.createMediaElementSource(MyHTML5AudioEl) lets you create a sourceNode that takes the source from a HTML5 object. With this I was able to loop through different song.
However for my game I need to play/analyze a 30 seconds "remote url" that comes out of the Spotify API. I might be wrong but ctx.createMediaElementSource(MyHTML5AudioEl)does not allow you to analyze a source that is on a remote site.
Also the game needs to work on Mobile Chrome, which createMediaElementSource(MyHTML5AudioEl) does not seem to work on.
I might be on the completely wrong path here but my main question is:
How can I switch remote songs urls in web audio api. With it being compatible with mobile chrome.
Thanks!
First, as you found out, you can't set the buffer again for an AudioBufferSource. The solution is to create a new one. AudioBufferSources are intended to be light-weight objects that you can easily create and use.
Second, in Chrome 42 and newer, createMediaElementSource requires appropriate CORS access so you have to make sure the remote url sends the appropriate headers and you set the crossOrigin attribute appropriately.
Finally, Mobile Chrome currently does not pass the data from an audio element through createMediaElementSource.
I'm currenly writing an app where I need to use custom sound for toast notifications (which is sent from cloud). MSDN states that the audio clip must be stored in the app's installation directory or local storage folder. So how is this done?
I tried the CopyToIsolatedStorage() code sample from How to play background audio for Windows Phone. It fetches the audio clip correctly but when the toast should be shown the device won't play any audio or even show the toast which indicates that it can't find the audio clip correctly. In the app, I have a method which shows contents of the push notification when the app is in foreground. From there I can see that the toast notification is sent and received correctly with toast.mp3 sound tag. So the problem must be in the app but I can't figure out what I did wrong.
Tl;dr version:
I want to change toast notification sound, my device is running WP8 with Update 3 and I have a 5 sec long mp3. I can't figure out how and where I should put the audio clip.
I dont think you need to copy the sound to isolated storage, just put it in your main project and set it as content. Then in your Push just reference it.
<wp:Sound>toast.mp3</wp:Sound>
Or if it is in the Assets folder in your project do
<wp:Sound>Assets/toast.mp3</wp:Sound>
Note: This only works for Windows Phone 8 Update 3 and later, works fine for all Windows Phone 8.1.
So the problem was that I blindly assumed one can reference to the audio clip with just <wp:Sound>toast.mp3</wp:Sound> or new Uri("toast.mp3", UriKind.RelativeOrAbsolute), as in the MSDN tutorial, when the file is copied to the root of the isolated storage but this isn't the case. You'll have to include the directory where the clip is in your project to the path, in my case Audio\. Thaks goes to WiredPrairie for pointing this out.
So to wrap things up:
Copy the audio clip which you want to use to the isolated storage with CopyToIsolatedStorage() from How to play background audio for Windows Phone and follow the instructions in Using custom sounds in toasts on Windows Phone 8 Update 3 . And remember to include the directory structure to the path of the clip or put the clip in the root of your project.
I've created a game in FlashDevelop IDE. I put the html and swf file on my server and my game plays perfectly off the website. However, I can't get it to update. After making changes, I delete the old swf file, generate a new one, and re-upload it, but it is still the same old version when I navigate to the site. Any thoughts?
The super simple way is to update a GET param on your flash file for every update you make.
Instead of requesting mygame.swf, you'd request mygame.swf?version=1, and when updated mygame.swf?version=1.2 etc.
This would mean that the browsers would think that this is a new swf file (even though it isn't) and force them to redownload it.
Hi my name is Tamer and this is very first post in stackoverflow as far as I know. :)
I've been searching this for an issue of mine for a while but haven't found any solutions yet. I want to forward my radio broadcast from it's original host to my embedded flash player once the play button is hit. Is it possible via action script (flash - as3) ? My broadcast is in Icecast format, and I'm playing mp3 but my mount point is not exactly /listen.mp3. It has some more extention like ?auth and some random fixed stuff (I mean, there are some other things at the end of the auth part, but it's same all the time like a fixed link).
Thanks for your help and time!
Yes, you can play your stream with Flash. It doesn't matter what your mount point is. Just plug in the real URL for the stream. The file name extension and what not doesn't matter.
When using the above answer high memnory use may be an issue for your viewers as the "Sound" variable downloads the data while playing.
Would be better off using progressive play/download but would have to change your streaming format from mp3 as it only allows for M4A streaming (AAC audio data in an MP4 container).
var netConnection:NetConnection = new NetConnection();
netConnection.connect(null);
var netStream:NetStream = new NetStream(netConnection);
netStream.play(“http://your.stream.url/stream.m4a”);
Just my 2cents :)