Languages

Menu
Sites
Language
Audio lag in Web Application

I have a problem with my web application. It is a game and when the user taps  one image it is supposed to play a short audio sound. There are 8 images in png format and respectively 8 ogg sounds for each of them. My problem is that there is lag on image click and sound play. I have used the preload and autobuffer attributes of audio tag in html5. I also used many channels for the simultaneously palying of sounds. In the web simulator it works perfect with no lag. But in Tizen device the lag is obvious. I have the latest firmware installed in the device.  I suppose there is a hardware issue that is going to be fixed with updated firmware? Any help would be apreciated.

Thanks in advance

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

4 Replies
Raghavendra Reddy Shiva
Which ref device are you using RD-210/RD-PQ ? Have you tried with latest 2.0 images ? (You might need to upgrade device's partition structure, if using RD-210 before flashing the latest 2.0 images) Please try using the below images depending on the device you have. For RD-210 http://download.tizen.org/releases/2.0/tizen-2.0_20130218.10/images/RD-210/ For RD-PQ http://download.tizen.org/releases/2.0/tizen-2.0_20130218.10/images/RD-PQ/ Have quickly checked the audio playback on the Ref device-PQ with the below code, and don't find any audio playback lag from the time when the image is clicked and audio started. <img src="xyz.png" class="audioplay"></img> <audio id="player" src="WebContent/sample.ogg" type="audio/ogg" preload="auto"></audio> $("img.audioplay") .attr("data-src-ogg","/../WebContent/Another_Day_in_Paradise.ogg"); $("img[data-src-ogg]").click(function () { var player = document.getElementById("player"), $this = $(this); if ($(this).hasClass("selected")) { if (player.paused) { player.play(); } else { player.pause(); } } else { $("img[data-src-ogg].selected").removeClass("selected"); $this.addClass("selected"); $(player).empty(); $(player) .append($("").attr("src", $this.attr("data-src-ogg"))) player.play(); } });
Byron Gavras
The model is Ref. Device-PQ and the version TIZEN 2.0.0 PQ-20130215.1502. The code you posted still produces a lag in the audio play. Thank you for the answer.
Raghavendra Reddy Shiva
Can you share your code snippet to verify ?
Byron Gavras
Sure Here is my code: https://docs.google.com/file/d/0B7nCW_yTPoBDZnBnNlByN2pjZVU/edit?usp=sharing