')
.attr({id: 'lists'})
.css({
position: 'absolute',
left: 0,
top: '100px',
right: 0,
bottom: 0,
width: '512px',
margin: '0 auto 0 auto',
opacity: 0
})
.appendTo($box),
$support = $('
').css({
clear: 'both',
}).append(
$('
![]()
').attr({src: '/static/png/sd.logo.png'}).css({width: '64px', height: '64px', float: 'left'})
).append(
$('
').html('“Bu websitesi Sivil Düşün AB Programı Aktivist Desteği kapsamında Avrupa Birliği desteği ile hazırlanmıştır.” “Bu websitesi içeriğinin sorumluluğu tamamıyla Koza Görsel Kültür ve Sanat Derneği\'ne aittir ve AB\'nin görüşlerini yansıtmamaktadır.”')
);
$preferencesButton.appendTo($footer);
$aboutButton.appendTo($footer);
function getVideos(clips, resolution) {
var videos = [];
clips.filter(function(clip) {
return clip.duration;
}).map(function(clip) {
videos = videos.concat(pandora.getClipVideos(clip, resolution));
});
console.log(videos)
return videos;
}
function loadEdit() {
pandora.api.getEdit({
id: "mamafih:homepage",
}, response => {
var edit = response.data
pandora.api.sortClips({
edit: edit.id,
sort: [{
key: 'random',
operator: '+'
}]
}, result => {
edit.clips.forEach(function(clip) {
clip.sort = result.data.clips.indexOf(clip.id);
});
edit.clips = Ox.sortBy(edit.clips, 'sort');
var player = window.player = Ox.VideoElement({
items: getVideos(Ox.clone(edit.clips), pandora.user.ui.videoResolution),
autoplay: true,
muted: true,
loop: true,
}).css({
position: 'fixed',
top: 0,
bottom: 0,
left: 0,
right: 0,
width: '100%',
height: '100%'
})
player.find('video').css({
width: '100%',
height: '100%',
'object-fit': 'cover',
})
player.prependTo(pandora.$ui.home)
player.bindEvent('loadedmetadata', () => {
console.log('now play')
player.play()
setTimeout(() => {
player.play()
}, 1000)
})
})
})
}
loadEdit()
function showFeatures() {
pandora.api.getHomeItems({active: true}, function(result) {
var items = result.data.items.filter(pandora.isCompleteHomeItem),
$texts;
$features.empty();
if (items.length) {
$texts = Ox.Element().appendTo($features);
items.forEach(function(item) {
var $item = pandora.renderHomeItem({
data: item
}).css({
minHeight: "128px",
borderRadius: "16px",
background: "rgba(0,0,0,0.2)",
border: "5px rgba(0,0,0, 0.01) solid"
}).appendTo($texts);
$item.find('.OxEditableContent').css({
color: "rgb(240, 240, 240)",
})
});
} else {
$features.css({
top: '132px'
});
}
$features.append($footer);
$features.animate({opacity: 1}, 250);
});
}
that.fadeInScreen = function() {
that.appendTo(Ox.$body).animate({opacity: 1}, 500, function() {
that.find('*').animate({opacity: 1}, 250, function() {
showFeatures();
});
});
return that;
};
that.fadeOutScreen = function() {
$('.OxTooltip').remove();
that.animate({opacity: 0}, 500, function() {
that.remove();
});
pandora.$ui.tv && pandora.$ui.tv.unmute().find('.OxControls.OxVolume').hide();
self.keydown && Ox.$document.off({keydown: self.keydown});
return that;
};
that.showScreen = function(callback) {
var $elements = that.find('*'), count = 0;
$box.css({top: window.innerHeight / 2 - 80 + 'px'});
that.css({opacity: 1}).appendTo(Ox.$body);
$box.animate({top: '80px'}, 500, function() {
$elements.animate({opacity: 1}, 250, function() {
if (++count == $elements.length) {
showFeatures();
callback && callback();
}
});
});
return that;
};
return that;
};