You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

1

Friday, December 3rd 2010, 10:40am

Sound unsupported on HTML5?

I finally got the soundinterface working together with my demos but testing it with Safari it seems that it is not supported with HTML5.

Anyone done some real tests on iPad?

Hans

This post has been edited 1 times, last edit by "HansNyb" (Dec 3rd 2010, 10:56am)


2

Monday, December 6th 2010, 4:34pm

Hi,

right, there is currently no support for sound,

all Flash plugins (all files with .swf) are not supported in HTML5,
so too the soundinterface.swf plugin,

I'm working on a build-in soundinterface support for the krpanoJS viewer,
but it will not be able to support the full functionally as the Flash plugin
due the technically/principal HTML5 limitations,

best regards,
Klaus

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

3

Monday, December 6th 2010, 6:59pm

Hi,

right, there is currently no support for sound,

all Flash plugins (all files with .swf) are not supported in HTML5,
so too the soundinterface.swf plugin,

I'm working on a build-in soundinterface support for the krpanoJS viewer,
but it will not be able to support the full functionally as the Flash plugin
due the technically/principal HTML5 limitations,

best regards,
Klaus


No problem, it is solved. I now have full sound support on iPad with background sound loading automatically and with control button for start and stop.
'
Hans

VN2009

Professional

Posts: 1,336

Location: Duluth MN

  • Send private message

4

Monday, December 6th 2010, 7:28pm


No problem, it is solved. I now have full sound support on iPad with background sound loading automatically and with control button for start and stop.
'
Hans


how did you accomplish that Hans i am very curious to know!

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

6

Tuesday, December 7th 2010, 9:35am

Well my workaround is very simple.
Just old simple webpage stuff.
I made an iframe on the html outside the body just 1x1 pixel is fine.
I put an empty html page in it for the start and on the intro and on the thumbnails i put alink directly to the mp3 file.

Here is a demo. There is one small thing. The sound appears in the history as untitled page. However there is no problem using backbutton , it ignores it.
http://www.panoramas.dk/panorama/krpano/fireworks/

Unfortunately I just discovered that it does not work on Android.
Doing some searches on sound in Android I also found that the HTML5 webpage sound does not work either.

However flash sound on my FPP panoramas work perfect.

Hans

7

Tuesday, December 7th 2010, 10:24am

Hi Hans,

I have tested it on my iphone and the sound is played on the quicktime player (in fullscreen mode).
And when I click the done button, the safari browser takes me the previous html page.
Have you tested it also on the iphone?

Best Regards,
Hyung

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

8

Tuesday, December 7th 2010, 11:51am

Hi Hans,

I have tested it on my iphone and the sound is played on the quicktime player (in fullscreen mode).
And when I click the done button, the safari browser takes me the previous html page.
Have you tested it also on the iphone?

Best Regards,
Hyung


What iPhone?
Ayrton has tested it on his iPhone 3 not with latest system and it did not work.

How do you see it is played with quicktime? does the quicktime player load on top of the pano?

Hans

9

Wednesday, December 8th 2010, 5:57am

Hi Hans,

I have tested on 3GS (iOS 3.X) and 3GS (iOS 4.X) and the both give
the same result. Refer to the following image:


The quicktime player shows on top of the panorama. And when I click the "Done" button,
not only quicktime player terminates, but the browser takes me to the previous html page.
(which I don't understand why)


I haven't tested on iphone 4 or 3g.

Did you use the "audio" tag? As far as I know, there is an audio tag in HTML5 and you
can control it via Javascript. I will post it when I find it.

Best Regards,
Hyung

Sam Rohn

Trainee

Posts: 110

Location: Brooklyn, New York

Occupation: 360° VR Photographer

  • Send private message

10

Wednesday, December 8th 2010, 10:26am

i just tried hans' link on my iPhone 4 w/ latest iOS 4.2.1, same result as hyung -

sam
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

11

Wednesday, December 8th 2010, 11:41am

Thanks for testing.
I do not understand why iPhone behave differently than the iPad. I thought the Safari browser used was the same. Apparently iPad can autoplay an mp3 in an iFrame just like on standard desktop browsers. The big problem is actually autostart in a webpage. This is easy done for desktops but does not work for HTML5, I do not think it will work with the special HTML5 embed either. Apparently linking directly to the mp3 autostarts it but iPhone pops it up instead of playing it in the iFrame. I just made a test and embedded it in a webpage as QT sound with autostatart, This work perfect on desktops but it fails on the iPad.

You can test it here, http://panoramas.dk/panorama/krpano/fireworks/index1.html

Hans

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

12

Wednesday, December 8th 2010, 12:32pm

Here is one more test. This page opens the sound as a webpage with HTML5 sound
http://panoramas.dk/panorama/krpano/fireworks/index3.html

The sound is an mp3 embedded like here
http://html5doctor.com/native-audio-in-the-browser/

I added the autoplay="true" and this works perfect in Safari HTML5 but on my iPad it does not start.

This is the BIG problem.
Note that Firefox does not yet support this tag for mp3.

Hans

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

13

Wednesday, December 8th 2010, 12:39pm

There is a lot about this on the web.
http://stackoverflow.com/questions/30098…ipad-with-html5

Not sure if something like this guy have made can do it
http://jnjnjn.com/187/playing-audio-on-t…and-javascript/

I have to say that I am sick of Mr Jobs idiotic ideas on what to support on the iPad.

Hans

14

Wednesday, December 8th 2010, 2:55pm

Hi,

regarding to this topic - I have just released the first version of the soundinterface plugin for the krpanoJS viewer:

get it here:
http://krpano.com/download/beta/#2010-12-08

the available soundinterface functions:
  • playsound(id, soundfile, loops*, oncomplete*);
  • pausesound(id);
  • resumesound(id);
  • pausesoundtoggle(id);
  • stopsound(id);
  • stopallsounds(id);

how to include it:

Source code

1
2
3
4
5
6
<plugin name="soundinterface"
        url="soundinterface.swf"
        alturl="soundinterface.js"
        keep="true"
        onloaded=""
        />


notes:
  • this is a pre-release, subjects and features may change until the final version!
    this version is not feature complete!
  • the preload="true" setting is currently not supported in the krpanoJS viewer, that means the soundinterface functions become available first after the onloaded event of the plugin
  • on the iPhone and iPad it's only possible to play only ONE sound, a second playsound() call will stop automatically the first sound
  • on the iPhone and iPad a sound can only start playing after a touch of the user, when the playsound() call happens in an onclick, ondown, onup event it will start automatically but with it happens out of an user event the sound will be pending until the first touch on the screen, but then the sound will start automatically

best regards,
Klaus

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

15

Wednesday, December 8th 2010, 3:39pm

So you are supposed to use the old soundinterface.swf?

I just included the basic code like this
<plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="soundinterface.js"

keep="true"
onloaded=""
/>

All the 3 new js files are at the rooth.

I got an error both in Safari/ipad and on a real iPad which says it can not find soundinterface.js
secondary I get an error claiming that view.mfov, is unsupported. Worked fine on all test before and it does not show when I remove the soundinterface codes.

Hans
I

HansNyb

Professional

  • "HansNyb" started this thread

Posts: 1,063

Location: Denmark

Occupation: Photographer

  • Send private message

16

Wednesday, December 8th 2010, 3:55pm

This works in Safari flash and plays the sound
<plugin name="soundinterface"
url="plugins/soundinterface.swf"
alturl="soundinterface.js"
keep="true"
onloaded="playsound(sound1,sounds/sound1.mp3,loops);"


/>

but gives me the same parsing error on iPad.

Hans

17

Wednesday, December 8th 2010, 5:26pm

Hi,
So you are supposed to use the old soundinterface.swf?
how do you mean that?

in the krpano Flash viewer the normal soundinterface.swf will be used (url),
and in krpano Javascript/HTML5 viewer the new soundinterface.js will be used (alturl),


All the 3 new js files are at the rooth.

I got an error both in Safari/ipad and on a real iPad which says it can not find soundinterface.js
are you using the right krpanoiphone.js?
note when you have used the droplets before to build the pano or tour then
the krpanoiphone.js was probably embedded already in a .js file,

to find out if you are using the right krpano viewer and version,
press the 'O' key in the viewer (Flash and HTML5),

secondary I get an error claiming that view.mfov, is unsupported. Worked fine on all test before and it does not show when I remove the soundinterface codes.
you get that error in the flash viewer, or?
just as note - there is no "view.mfov" variable, maybe you mean fovtype="MFOV"...?


onloaded="playsound(sound1,sounds/sound1.mp3,loops);"
one more note - the "loops" is wrong, put there either a number of loops (0=unlimted looping, 1=for playing once) or remove the setting if you don't want the sound to be loop,

best regards,
Klaus

18

Wednesday, December 8th 2010, 5:44pm

Hi Klaus
I get this message on iPad "loading error : soundinterface.js"

19

Wednesday, December 8th 2010, 5:47pm

Hi,
I get this message on iPad "loading error : soundinterface.js"
have you updated also the krpanoiphone.js?

best regards,
Klaus

20

Wednesday, December 8th 2010, 5:50pm

Yes the three files

Similar threads