How to play sound in opera mobile and opera 10.10 for linux?

Forums » Dev.Opera » General Web Development Discussions

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

16. May 2010, 15:42:04

amsterdamharu

Posts: 4

How to play sound in opera mobile and opera 10.10 for linux?

http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/

Opera desktop version 10.10 deb package for Linux Mint 8
The audio tag gives me audio not supported, the scripted way is the same:
this.audioElement = document.createElement('audio');
!this.audioElement.canPlayType // false in Opera desktop and mobile version

So try the Audio object:
this.audio = new Audio("hsk1/1east.wav");
this.audio.play();
Never plays anything no error (works in firefox)

this.audio = new Audio("hsk1/1east.wav");
this.audio.play();
this.audio.onload = function () {
myCourse.audio.play();
};
Never plays anything no error (works in firefox)

this.audio = new Audio();
results in an error:
Unhandled exception: [Object InternalException]
name: Error
message: WRONG_ARGUMENTS_ERR
stacktrace: Line 2 of linked script In function course
this.audio = new Audio();

Opera mobile for linux: (emulator to debug)

this.audio = new Audio("hsk1/1east.wav");
Error:
name: ReferenceError
message: Statement on line 2: Undefined variable: Audio
Both audio tag and scripted version not supported.
Tried with ogg files with the same result.

I love the debug methods for opera mobile and opera but sadly needed to use it a lot. Like firebug better for debugging but can't debug opera mobile with that.

So what opera version is the article talking about? What can I do to support playing short audio files in the browser?

29. May 2010, 14:50:37

amsterdamharu

Posts: 4

Is this forum dead or something? Well I tried the embed tag and got sound on opera on my desktop. Nothing on my windows mobile. There is a box with the text "Plug-in content". How do I find the plugins installed and how do I install others?

Strange I cannot find any info on this for opera mobile.

Forums » Dev.Opera » General Web Development Discussions