wrap image urls in pandora.getMediaURL to add option to load image from another domain

This commit is contained in:
j 2014-02-02 11:30:25 +00:00 committed by rolux
commit 522af49a73
22 changed files with 118 additions and 77 deletions

View file

@ -29,13 +29,13 @@ pandora.ui.editor = function(data) {
enableSubtitles: ui.videoSubtitles,
find: ui.itemFind,
getFrameURL: function(position) {
return '/' + ui.item + '/' + ui.videoResolution + 'p' + position + '.jpg?' + data.modified;
return pandora.getMediaURL('/' + ui.item + '/' + ui.videoResolution + 'p' + position + '.jpg?' + data.modified);
},
getLargeTimelineURL: function(type, i) {
return '/' + ui.item + '/timeline' + type + '64p' + i + '.jpg?' + data.modified;
return pandora.getMediaURL('/' + ui.item + '/timeline' + type + '64p' + i + '.jpg?' + data.modified);
},
getSmallTimelineURL: function(type, i) {
return '/' + ui.item + '/timeline' + type + '16p' + i + '.jpg?' + data.modified;
return pandora.getMediaURL('/' + ui.item + '/timeline' + type + '16p' + i + '.jpg?' + data.modified);
},
height: pandora.$ui.contentPanel.size(1),
id: 'editor',
@ -298,9 +298,9 @@ pandora.ui.editor = function(data) {
function updateBrowser() {
pandora.$ui.browser.find('img[src*="/' + ui.item + '/"]').each(function() {
$(this).attr({
src: '/' + ui.item + '/' + (
src: pandora.getMediaURL('/' + ui.item + '/' + (
ui.icons == 'posters' ? 'poster' : 'icon'
) + '128.jpg?' + Ox.uid()
) + '128.jpg?' + Ox.uid())
});
});
}