dle, music, javascript
<head> <script type="text/javascript"> $(document).ready(function() { $('div.playa').live('click', function(){ var this_id = $(this).attr('id'); jwplayer(this_id).setup({ flashplayer: "/design/playerskin/player.swf", skin: "/design/playerskin/nacht.zip", file: $(this).attr("rel"), autostart: true, volume: 75, fullscreen: false, showdigits: false, height: 24, width: 175, allowscriptaccess: "always", bgcolor: "#000000", "controlbar.position": "bottom", events:{ onPlay: function() { $("object[id^=song]").each(function(index){ if($(this).attr('id') != this_id){ jwplayer($(this).attr('id')).stop(); } }); } } }); }); }); </script> <style type="text/css"> div.playa, div[id^=song] { background: url("/design/images/player.png") no-repeat center transparent; height: 24px; width: 175px; margin-left: auto; margin-right: auto; } </style> </head> <div id="song{news-id}" class="playa" style="cursor: pointer" rel="[xfvalue_tunescoop_m4a]"> </div> [xfvalue_tunescoop_m4a] - ссылка на музыку (прямая) движок сайта dle в чем ошибка? не воспроизводит музыку... |
а код пропустить через спец теги слишком сложно? ну не удобно же читать вашу писанину..
открывайте фаербаг. смотрите что в консоль валится.. мож ошибка какая то? |
![]() |
что то не хорошо с параметрами что подаеш, попробуй прописать путь на файл напрямую:
<div id='my-video'></div> <script type='text/javascript'> jwplayer('my-video').setup({ file: 'http://content.bitsontherun.com/videos/lWMJeVvV-364767.mp4', image: 'http://www.longtailvideo.com/content/images/jw-player/lWMJeVvV-876.jpg', width: '640', height: '360' }); </script> |
не, я думаю не в путях дело.. он ругается на строчку jwplayer(this_id).setup({
т.е. не известная jwplayer там либу скорей надо подключить с jwplayer |
Часовой пояс GMT +3, время: 11:11. |