onclick playSound Method not working in intel xdk - audio

i am not able to play the audio file onclick of a button.
here is the code i got from the xdk website.
function audioBtn()
{
// play the sound
intel.xdk.player.playSound("sounds/anything.wav");
}
the audio location is:
C:\Users\abc\Documents\pqr\www\sounds\anything.wav
Thanks in advance....

Intel XDK Emulator doesn't support playing audio files using the intel.xdk Player object, but this does work within the Intel App Preview mobile app for testing by scanning the QR Code under the Test tab.
For example, you can play audio files (supported by your platform of course) within your application in App Preview or on device as follows
intel.xdk.player.playSound(intel.xdk.webRoot + "sounds/anything.wav");
intel.xdk.webroot contains the path for the www/ directory.

Related

How to play a local movie file with AVPlayer in Tizen TV App using Tizen Studio

I have a mp4 video file that's located in a Tizen TV app. I created an image directory and placed the mp4 file along with other images used in the app.
In Tizen IDE Rev2.4, I was able to access the file and play the video by accessing it as below.
/opt/user/apps/{package_id}/res/wgt/images/FILE-NAME.mp4
With the new updated Tizen Studio 1.1, the above path throws an invalid URI error in AVPlayer.
How can I access to the locally stored video files using JavaScript? I couldn't find any answers on Tizen developers sites.
Thanks for your help in advance.
The new generated file path to the file is
file:///opt/usr/home/owner/apps_rw/{package_id}/res/wgt/images/FILE-NAME.mp4

Integration media foundation transform with zxing library

We have made an bar code and QR code scanner app for windows surface tablets 8.1. We have used ZXing library and implemented by keeping "Scan Code" button on UI.
But we want auto recognition feature without using button click. We have heard about Media Foundation transform (MFT) in .net whoch can be used to process each video frame. If we start recording video using media capture element once application launches, then MFT can be used to process each video frame automatically.
But we are not getting how to integrate MFT with ZXing library?If at all there is any paid library, let me know.
You can get autorecognition and detect any barcode/QR code in your app with this:
https://github.com/mmaitre314/VideoEffect#realtime-video-analysis-and-qr-code-detection (For decoding it uses ZXing)
Tried out and works. Just install the nuget package, and read the sample app:
https://github.com/mmaitre314/VideoEffect/tree/master/VideoEffects/QrCodeDetector

Playing audio on CDC device j2me

I have a j2me app built for a CDC device. I have used Personal profile to display the UI.
However now I need to play audio. AFAIK in j2me I can play audio only through J2me MMAPI i.e JSR135.
But on my device I don't have this. So can someone provide me input how I should go about porting this jsr on my device. It is a linux based ARM device. I had built and compiled cdc and personal profile by myself and ported on to the device. But now I am unable to find source code for Mobile media api.
Or do you have any option other than MMAPI to play audio?
I am unable to find source code for Mobile media api
Well as far as I can tell, above is available in an open source project PhoneME. MMAPI classes like Player, Manager, Control etc are shown at below link to their SVN code repository:
svn / components / jsr135 / trunk / src / share / core / javax / microedition / media

music player in iphone simulator 4.2

I am trying to add music player to my iphone app using the MediaPlayer framework. I dont have a real device with me and want to test it on simulator. But, the simulator doesnt support MPMusicPlayer and crashes when i run the add media app.
Is there a way I could test MPMusicPlayer on simulator?
You can't add music to the simulator so MPMusicPlayer will fail. It will have to be tested on a device.

Stream/Play audio files on mobile browsers

I am trying to create a mobile website and want to be able to play/stream audio files.I have tried html5's audio tag and tried testing it on opera mobile 10 simulator but it does not work. I have lots of audio files and the audio should be auto played.
sidenote:
Also, i need to test my website for android and iphone mobile phones. I am downloading android emulator for windows. I tried searching for iphone emulator for windows but there are none...
Phone emulators aren't always a good indicator as they do not usually have a media player installed. The best way to test is to find someone with an actual Andriod / Blackberry / iPhone.
You should try the same HTML5 code with an actual phone. Note that Opera Mobile 10 does not have support for the video/audio tag. If you're interested in streaming to mobiles without HTML5, you should check this FAQ entry for more information.

Resources