Помощник
|
Вкл/выкл звук |
rukrylov
|
Сообщение
#1
|
||
|
|
||
|
|||
P0ZiTR0N |
24.5.2011, 10:37;
Ответить: P0ZiTR0N
Сообщение
#2
|
|
MP3 проигрывается только с помощью flash плеера
|
|
|
Eгор |
24.5.2011, 16:05;
Ответить: Eгор
Сообщение
#3
|
|
Можно. С помощью jquery sound.
<script type="text/javascript" src="js/jquery.sound.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#playLink').click(function() { $.fn.soundPlay({url: 'mp3/Philip Glass-Opening.mp3', playerId: 'embed_player', command: 'play'}); $("#sound_file_name").html("Philip Glass-Opening.mp3"); }); $('#stopLink').click(function() { $.fn.soundPlay({playerId: 'embed_player', command: 'stop'}); }); }); </script> <div id="container"> <div id="player-ui"> <div class="clear player-info"><span style="float:left">Sound File:</span><span id="sound_file_name"> </span></div> <div class="clear player-commands"> <a href="javascript://" id="playLink"> <img src="images/play.png" alt="Play" title="Play" /> </a> <a href="javascript://" id="stopLink"> <img src="images/stop.png" alt="Stop" title="Stop" /> </a> </div> </div> </div> Как-то так. |
|
|
Eгор |
24.5.2011, 16:16;
Ответить: Eгор
Сообщение
#4
|
|
|
Даже как-то так:
<head> <title>JQuery sound play / stop plugin.</title> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery.sound.js"></script> <script type="text/javascript"> $.fn.soundPlay({url: 'mp3/Philip Glass-Opening.mp3', playerId: 'embed_player', command: 'play'}); $("#sound_file_name").html("Philip Glass-Opening.mp3"); $(document).ready(function() { $('#playLink').click(function() { $.fn.soundPlay({url: 'mp3/Philip Glass-Opening.mp3', playerId: 'embed_player', command: 'play'}); $("#sound_file_name").html("Philip Glass-Opening.mp3"); $("#playLink").attr('id','stopLink'); }); $('#stopLink').click(function() { $.fn.soundPlay({playerId: 'embed_player', command: 'stop'}); $("#stopLink").attr('id','playLink'); }); }); </script> </head> <body> <a href="#" id="stopLink" style="text-decoration:yes">Вкл/Выкл звук</a> </body> </html>
|
|
|
||
|
Текстовая версия | Сейчас: 24.4.2024, 9:33 |