开发者

Audio player inside InfoWindow (Google Maps)

开发者 https://www.devze.com 2023-03-24 14:52 出处:网络
I need to show audioplayer(and play audio of course) inside marker\'s InfoWindow 1)I tried to use audio.js http://kolber.github.com/audiojs/

I need to show audioplayer(and play audio of course) inside marker's InfoWindow

1)I tried to use audio.js http://kolber.github.com/audiojs/

It works if I put 'audio' tag on the page code, but if I write something like this

playerhtml ='<audio src="4.mp3" preload="auto"/>';
infowindow = new google.maps.InfoWindow({content: playerhtml});
infowindow.open(开发者_开发知识库map, marker);

the infowindow is empty.

2)I also tried ordinary flash player:

var playerhtml;
playerhtml = "<object data='webplayer.swf' type='application/x-shockwave-flash' width='200' height='16'>";
playerhtml += "<param name='movie' value='webplayer.swf'>";
playerhtml += "<param name='menu' value='false'>";
playerhtml += "<param name='scale' value='noscale'>";
playerhtml += "<param name='bgcolor' value='#FFFFFF'>";
playerhtml += "<param name='flashvars' value='src=";

playerhtml += path;

playerhtml += "&amp;autostart=no&amp;volume=10&amp;loop=no'>";
playerhtml += "</object>";

However sometimes I see it in the player, but in most cases infowindow is empty too.

Anybody can say where I'm wrong or suggest right solution?

Thanks.


This http://www.schillmania.com/projects/soundmanager2/

is a very good solution for audio using javascript

Works fine

0

精彩评论

暂无评论...
验证码 换一张
取 消