Store and Retrieve mp3 files in windows phone? - windows-phone-7

I'm new to windows phone development. I need to save and play audio files in my project. for that i need to store mp3 files into the database. I got idea from net, either we can store mp3 files directly to DB or store mp3 files to Isolatedstorage and store only URL in the database.
Now i was confused, we could be an easy way to achieve me expectation ? Suggest me which is one best? Also pls share some sample code....
Thanks
SheikAbdullah

Store the mp3's in Isolated Storage in the App/Shared/Media folder, then tell the Zune player to play them.
How to: Play Background Audio for Windows Phone

Related

Share videos camera roll wp 8

I tired to googling that how share videos form camera roll in windows phone 8 like in Nokia video upload and facebook app. I used to try this
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff967563(v=vs.105).aspx
Only share picture but I want to share only videos for my app e.g. when my app show in list when share a video by camera roll of windows phone in sharing
To quote the link you included in your question:
Note that this extensibility is only available when the photo is a JPG
file.
And from my experience, I can confirm that it is not possible to register your app as a share target for a video file.
In other words, if a user tries to share a video from the camera roll or another app, there is no way to make your app appear as one of the options in that list.
Did you try using the share media task function?
Check this article out from the msdn :
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207027(v=vs.105).aspx
You can use MediaLibrary and there is already an answer for your question in this link. As said, there is no way to select existing sound media and video files through default choosers. Thank you.

Microsoft Player Framework not playing local files

I am developing a windows 8 app in winjs and one of its features is to be able to play local video files. So far I am using:
Windows.System.Launcher.launchFileAsync
Which works fine but obviously suspends the app and opens the video with their default video program. I would rather keep the user in the app so I tried to implement it using the Microsoft Player Framework(http://playerframework.codeplex.com/). I know the framework is referenced correctly etc because it can play video files both in the 'app data' directory and online.
However when I try to play files within a folder that the user has picked (with the folder picker) or the videos library that the app has declared access to, the video fails to play. The app can however change the name, create new files in the directory and delete files so I struggle to see a permissions problem.
To get the path of the file I am using getFileAsync( and using the path property and simply using that to set the src property of the MediaPlayer control.
Do any windows 8 app gurus have any suggestions as to why it is not working?
Thanks in advance
p.s. let me know if any further info is required

How to download and save audio and video in wp7 mediaLiabrary?

Can you please tell me how to save or store sample audio and vidio into mediaLibrary.From my application if i long press on a picture i get a save picture option that saves the picture under saved pictures category in MediaLibrary. Similarly how do i save a mp3 and mp4 file.
I am able to downloadcontent and play the audio on emulator directly but not able to save any mp3 file from the web onto the MediaLibrary. Is there any other way to add songs to MediaLibrary?
Please Help me.
Thanks
The Windows Phone 7 API does not allow saving audio and video to the Media library, only on the isolated storage of the application itself.
This is in contrast to Pictures, which like you said you can save to the Media library.

How add video from app to collection?

My app downloads video from server and saves it in IsolatedStorage.
Can i add this video to phone collection?
No, it's not possible in Windows Phone 7. You can use MediaLibrary that will give you access to metadata related to existing songs and pictures, but that's about it. You cannot currently read or write videos stored on the phone.

Is it possible to grab a snapshot from a previously recorded video on Windows Phone 7?

I'd like to know if it's possible to grab snapshots from previously recorded videos. Those videos are recorded in the app itself.
By the way, I'd like to grab the snapshot from a video file saved in IsolatedStorage without having to play the video.
Is it possible? If so, how can I do it?
Cheers,
Rafael
I am not aware of an official platform feature to do this. However, if the video file is within your app's isolated storage, you might be able to:
Send the video to a server to do the processing
Add codecs/C# code to your app to process the raw MPEG4 frames.
Try using WriteableBitmap to capture a specific frame when using the media element. Since most media is handled in hardware, however, it is possible that the frame will be blank.
I solved the problem by creating the thumbnail while recording the video (captureSource.CaptureImageAsync()). To do that, I used the same instance of the CaptureSource I'm using to record the video.

Resources