(function () {
var widgetIframe = document.getElementById('sc-widget');
var widget = SC.Widget(widgetIframe);
widget.bind(SC.Widget.Events.READY, function () {
alert('Виджет плеера загрузился!');
widget.bind(SC.Widget.Events.PLAY, function () {
alert('Начато воспроизведение');
// get information about currently playing sound
widget.getCurrentSound(function (currentSound) {
console.log('sound ' + currentSound.get('') + 'began to play');
});
});
});
}());
var rename = require("gulp-rename");
gulp.src("./*.html")
.pipe(rename(function (path) {
path.extname = ".php"
}))
.pipe(gulp.dest("./dist"));
function tab(elem) { //Вставить табуляцию перед элементом
var newTab = document.createElement('pre');
newTab.innerHTML = '\t';
newTab.style.display = 'inline';
elem.parentNode.insertBefore(newTab, elem);
}