![]() |
Модераторы: Sardar, Aliance |
![]() ![]() ![]() |
|
adrian67 |
|
|||
Новичок Профиль Группа: Участник Сообщений: 1 Регистрация: 10.3.2012 Репутация: нет Всего: нет |
не могу сделать время и подключить Плейлист((
<!-- - - Sound Manager 2 - - --> <script src="javascripts/soundmanager2.js"></script> <script> soundManager.flashVersion = 8,9,10; soundManager.url = 'javascripts/soundmanager2.swf'; soundManager.useFlashBlock = false; soundManager.debugMode = false; soundManager.waitForWindowLoad = true; soundManager.useHTML5Audio = true; soundManager.onready(function() { var mySound = soundManager.createSound({ id: 'podcast-player', url: 'http://cs4527.vk.com/u56363091/audio/94647e45ac57.mp3', autoLoad: false, autoPlay: false, volume: 30, onload: function() { $('#podcast-play_pause').removeClass('podcast-play').addClass('podcast-pause'); }, onpause: function() { $('#podcast-play_pause').removeClass('podcast-pause').addClass('podcast-play'); }, whileloading: function() { document.getElementById("podcast-progress-load").style.width=(((this.bytesLoaded/this.bytesTotal)*100)+'%'); }, whileplaying: function() { // Конвертация времени milliSecs = this.position msSecs = (1000) msMins = (msSecs * 60) msHours = (msMins * 60) numHours = Math.floor(milliSecs/msHours) numMins = Math.floor((milliSecs - (numHours * msHours)) / msMins) numSecs = Math.floor((milliSecs - (numHours * msHours) - (numMins * msMins))/ msSecs) if (numSecs < 10){ numSecs = "0" + numSecs if (numSecs > 10) numSecs = "0" + numSecs } resultString = /*numHours + ":" + */numMins + ":" + numSecs $('#podcast-current-time').html(resultString); milliSecs = this.position msSecs = (1000) msMins = (msSecs * 60) msHours = (msMins * 60) numHours = Math.floor(milliSecs/msHours) numMins = Math.floor((milliSecs - (numHours * msHours)) / msMins) numSecs = Math.floor((milliSecs - (numHours * msHours) - (numMins * msMins))/ msSecs) if (numSecs < 10){ numSecs = "0" + numSecs if (numSecs > 10) numSecs = "0" + numSecs } resultString = numMins + ":" + numSecs $('#podcast-duration').html(resultString); // Значения для прогресс-бара $("#podcast-progress-bar").slider("option", "value", this.position); $("#podcast-progress-bar").slider("option", "max", this.durationEstimate); }, }); // Play/Pause $('#podcast-play_pause').click(function () { soundManager.togglePause('podcast-player'); }); // Громкость $("#podcast-volume-bar").slider({ range: "min", value: 30, min: 0, max: 100, step: 1, animate: true, slide: function(event, ui) { soundManager.getSoundById('podcast-player').setVolume(ui.value); } }); // Включение и выключение громкости $('#podcast-mute').click(function(){ soundManager.getSoundById('podcast-player').setVolume(0); $("#podcast-volume-bar").slider('value', 0); return false; }); $('#podcast-unmute').click(function(){ soundManager.getSoundById('podcast-player').setVolume(100); $("#podcast-volume-bar").slider('value', 100); return false; }); // Прогресс $("#podcast-progress-bar").slider({ range: "min", min: 0, step: 1, animate: true, slide: function(event,ui) { soundManager.getSoundById('podcast-player').setPosition(ui.value); } }); }); </script> <!-- - - - - - - - - - - --> <!-- - - - Playlist - - - --> <script> function initMenu() { $('#podcast-list .podcast-list-item-more').hide(); //$('#podcast-list .podcast-list-item-more:first').show(); $('#podcast-list article a').click( function() { var checkElement = $(this).next(); if((checkElement.is('.podcast-list-item-more')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('.podcast-list-item-more')) && (!checkElement.is(':visible'))) { $('#podcast-list .podcast-list-item-more:visible').slideUp('normal'); $('#podcast-list article a').slideDown('fast'); //fix $(this).slideUp('fast'); //fix checkElement.slideDown('fast'); return false; } } ); } $(document).ready(function() {initMenu();}); </script> <!-- - - - - - - - - - - --> <!-- - - - Nano Scroller - - - --> <script src="jquery.nanoscroller.js"></script> <script> $(function(){ $('.nano').nanoScroller(); }); </script> <!-- - - - - - - - - - - - - - --> Присоединённый файл ( Кол-во скачиваний: 11 ) ![]() |
|||
|
||||
![]() ![]() ![]() |
Форум для вопросов, которые имеются в справочниках, но их поиск вызвал затруднения, или для разработчика требуется совет или просьба отыскать ошибку. Напоминаем: 1) чётко формулируйте вопрос, 2) приведите пример того, что уже сделано, 3) укажите явно, нужен работающий пример или подсказка о том, где найти информацию. |
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | JavaScript: Общие вопросы | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |