سؤال

How to properly embedd asx audio stream into a web page, and set desired volume level? I want set background music, the player should be hidden on web page. I tried sample code below, it works, but I can no set volume level - it always play at maximal volume. p.s. asx stream play without autostart parameter, too.

<embed src="http://top.tk/wma/audiostream.asx" width="0" height="0" autostart="true">
هل كانت مفيدة؟

المحلول

Ok , I find solution myself.

<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3_js.swf" width="1" height="1">
    <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3_js.swf" />
    <param name="AllowScriptAccess" value="always" />
    <param name="FlashVars" value="mp3=http%3A//mysite.com/audio/file.mp3&amp;autoplay=1&amp;volume=30" />
</object>

نصائح أخرى

Look into using HTML 5 Audio elements, this has a volume property you can set and control using jQuery. See this Stack Overflow

<embed src="http://top.tk/wma/audiostream.asx" volume="XXX" width="0" height="0" autostart="true">

XXX being a value between 0 and 100.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top