Caching mp3 files on windows phone 8 - windows-phone-8

Suppose I have an app that can play MP3 files over the internet. Is it possible to automatically cache them as they get downloaded, just like browsers do it?

There is no any built in capabilities in WP8/8.1 API that can do this. The only way to do this is to download the mp3 to the IsolatedStorage and the use it.
If you want you can map the mp3 to the downloaded link by creating your own code in case you want the cache like functionality when offline. In the question there is not much information to go around but the final answer is, no there is not such capability as of now.

Related

How to stream video stored in S3 on html?

I have few video files uploaded on Amazon S3. I need to play those on an HTML page programatically one after one.
Few questions:
Why is the video not stored with any extension on S3?
When opening the AWS S3 link it directly asks to download it and save in some format. Can't we achieve it without downloading it?
From reading few articles I understand streaming is possible with using CloudFront and JW player. So can't we use HTML5 tag then?
Few of my questions are very amateur, so you can ignore them. But do guide me to eliminate doubts and if you can tell me the current solution broadly. I will manage the details.

How does deezer offline mode works

I know there's a new html5 API called web storage, but it basically allows only up to 5MB of storage per domain, so how services like Deezer do to offer an offline mode ? It means that they have to store the musics on the computer, but it's all in the browser, so how do they do to bypass the 5MB of storage ?
http://www.deezer.com/en/features/everywhere.html
I can't speak for Deezer, but there are several new APIs in development for HTML5 including the FileSystem and FileWriter API.
In use cases it gives examples of large storage requirements the API will be able to fulfil such as storage of large media files and assets.
Offline video viewer
It downloads large files (>1GB) for later viewing.
It needs efficient seek + streaming.
It must be able to hand a URL to the video tag.
It should enable access to partly-downloaded files e.g. to let you watch the first episode of the DVD even if your download didn't complete before you got on the plane.
It should be able to pull a single episode out of the middle of a download and give just that to the video tag.
It's still a working draft and not very widely adopted.

Is three a way for a Chrome App to reach user's file on hard drive with permission?

I'm developing a Chrome Packaged App with video playback feature.
First of all, I want to allow the user to stream online media (e.g. MP4 video), and at the same time, saving the video to a location chosen by the user. Is there a way to achieve so?
Also, I want to save the locations of media played by the user, and allow the user to play it later without locating it again. Do anyone have some ideas on that?
Thank you guys very much.
You should be able to do what you want. Your best bet currently is to use the chrome.fileSytem API, which lets you save files to a location chosen by the user. You can also use retainEntry and restoreEntry to allow you to play the files back in later sessions, however I don't believe that is not available in stable channel yet (it is currently restricted to the dev channel, but should be available for general use in version 31).
Also check out the chrome.mediaGalleries API. It is designed to provide access to media, however it doesn't provide the write capabilities you need yet.
Streaming can be done using HTML5 Video tag.
Please check :
http://html5doctor.com/the-video-element/
Also, you can use plugins like :
http://www.videojs.com/

How is soundcloud player programmed?

This may be too broad a question, but how is soundcloud actually programmed?
To be more specific,
What language was used to program it?
How does it display the frequency data?
If user uploads a file in a format different from MP3, is it converted MP3 or gets played as is? If former, how does the conversion work?
How does it "graphically" appear on a browser as it does? Is it also HTML 5 thing which I don't know anything about?
I'm a big fan of the soundcloud and couldn't stop wondering how all of these work!
Please help me out :)
SoundCloud developer here,
The API and the current website are built with Rails. For information about the architecture/infrastructure and how it evolved over the last 5 years, check out Evolution of SoundCloud's Architecture. The "next" version of the website (still in private beta) is built entirely with Javascript, and just uses the API to get its data. There's a lot more detail available in Building The Next SoundCloud.
I'm not sure exactly what language/libraries are used to process the audio, but many audio libraries do provide frequency data, and we just extract that.
Users can upload AIFF, WAVE (WAV), FLAC, OGG, MP2, MP3, AAC, AMR or WMA files. The originals are kept exactly as is for the download option, but for streaming on the site, they're converted to 128kbps MP3 files. Again, I'm not sure of the software/libraries, but I'm pretty sure it'd be ffmpeg.
For displaying the waveforms, on the back-end when the audio files are processed when they're uploaded, the waveform data is saved into a PNG file. On the current version of the website, we simply load that file. On Next, the png is processed to get the original data back out, and then it is drawn to a canvas at the exact dimensions needed (which keeps the image crisp). We're currently experimenting with getting waveform data in a JSON format to speed up this process.
I am copying the following info posted by David Noël somewhere else in 2010.
Web tier: Varnish, nginx, haproxy, thin
Data Management: Cassandra, MongoDB, mySQL master/slave cluster, memcached
Web framework: Ruby on Rails
CDN: Akamai and Edgecast
Transcoding/storage: AWS EC2/S3

Flash CS4/AS3 Writing local file from local game without save dialog prompt?

I'm writing a game to be run locally, on the user's computer. NOT over the internet.
I want to have a file that will hold the usernames and avatar indices (they're in an array).
I want to know if there's a way to write to files through Flash with AS3. I'm using CS4.
I'd also like to know if you can delete files through Flash, though that's just optional.
Thanks in advance for any help you can give.
If you want to make a game that runs locally on someone's computer, you should make it in Adobe AIR. AIR apps can read and write files, and do all sorts of useful things like show updates in the taskbar, etc. Whereas a simple SWF that you download and run locally can't do anything useful that it couldn't already do in the browser - it can't write or delete local files, for a start. (It can read local files, but only if you disable it from accessing the network.) Moreover, the standalone Flash player is not generally disseminated, so unless the user is a Flash developer they're just going to view your SWF in a browser anyway (unless you plan to publish projectors, which I also wouldn't recommend).
With all that said, however, even if you do your game as local flash content, you can still store information by using SharedObjects. They work the same way offline as online. You can't write the data out as a separate file, but you can store it between sessions easily enough.
if i understand what you are trying to do then why dont you use Adobe AIR? this is flash for the desktop