use same video keys in all players
This commit is contained in:
parent
773ab702e7
commit
105e00917a
4 changed files with 23 additions and 17 deletions
|
@ -26,16 +26,12 @@ pandora.ui.embedPlayer = function() {
|
||||||
$innerPanel, $outerPanel,
|
$innerPanel, $outerPanel,
|
||||||
$title, $player, $controls, $timeline, $annotations;
|
$title, $player, $controls, $timeline, $annotations;
|
||||||
|
|
||||||
pandora.api.get({id: ui.item, keys: [
|
pandora.api.get({id: ui.item, keys: pandora.VIDEO_OPTIONS_KEYS}, function(result) {
|
||||||
'duration', 'durations', 'layers', 'parts', 'posterFrame',
|
|
||||||
'rightslevel', 'size', 'title', 'videoRatio'
|
|
||||||
]}, function(result) {
|
|
||||||
if (removed) {
|
if (removed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
||||||
|
|
||||||
Ox.print('OPTIONS::::::::', options)
|
|
||||||
var isFrame = options['in'] && options['in'] == options.out,
|
var isFrame = options['in'] && options['in'] == options.out,
|
||||||
sizes = getSizes();
|
sizes = getSizes();
|
||||||
|
|
||||||
|
@ -363,8 +359,8 @@ pandora.ui.embedPlayer = function() {
|
||||||
|
|
||||||
that.resizePanel = function() {
|
that.resizePanel = function() {
|
||||||
var sizes = getSizes();
|
var sizes = getSizes();
|
||||||
$player.options({width: window.innerWidth, height: sizes.videoHeight});
|
$player && $player.options({width: window.innerWidth, height: sizes.videoHeight});
|
||||||
$outerPanel.size(0, sizes.innerHeight);
|
$outerPanel && $outerPanel.size(0, sizes.innerHeight);
|
||||||
options.showTimeline && $timeline.options({width: window.innerWidth - 16});
|
options.showTimeline && $timeline.options({width: window.innerWidth - 16});
|
||||||
options.showAnnotations && $annotations.options({width: window.innerWidth});
|
options.showAnnotations && $annotations.options({width: window.innerWidth});
|
||||||
return that;
|
return that;
|
||||||
|
|
|
@ -19,10 +19,7 @@ pandora.ui.embedTimeline = function() {
|
||||||
video,
|
video,
|
||||||
$title, $panel, $player, $annotations;
|
$title, $panel, $player, $annotations;
|
||||||
|
|
||||||
pandora.api.get({id: ui.item, keys: [
|
pandora.api.get({id: ui.item, keys: pandora.VIDEO_OPTIONS_KEYS}, function(result) {
|
||||||
'duration', 'durations', 'layers', 'parts', 'posterFrame',
|
|
||||||
'rightslevel', 'size', 'title', 'videoRatio'
|
|
||||||
]}, function(result) {
|
|
||||||
if (removed) {
|
if (removed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,7 @@ pandora.ui.item = function() {
|
||||||
|
|
||||||
pandora.api.get({
|
pandora.api.get({
|
||||||
id: pandora.user.ui.item,
|
id: pandora.user.ui.item,
|
||||||
keys: isVideoView ? [
|
keys: isVideoView ? Ox.unique(pandora.VIDEO_OPTIONS_KEYS.concat(pandora.site.itemTitleKeys)) : []
|
||||||
'audioTracks',
|
|
||||||
'cuts', 'duration', 'durations', 'editable', 'layers',
|
|
||||||
'modified', 'parts', 'posterFrame', 'rendered', 'rightslevel',
|
|
||||||
'streams', 'size', 'videoRatio',
|
|
||||||
].concat(pandora.site.itemTitleKeys) : []
|
|
||||||
}, pandora.user.ui.itemView == 'info' && pandora.site.capabilities.canEditMetadata[pandora.user.level] ? 0 : -1, function(result) {
|
}, pandora.user.ui.itemView == 'info' && pandora.site.capabilities.canEditMetadata[pandora.user.level] ? 0 : -1, function(result) {
|
||||||
|
|
||||||
if (pandora.user.ui.item != item) {
|
if (pandora.user.ui.item != item) {
|
||||||
|
|
|
@ -2011,6 +2011,24 @@ pandora.getCensoredClips = function(data) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pandora.VIDEO_OPTIONS_KEYS = [
|
||||||
|
'audioTracks',
|
||||||
|
'cuts',
|
||||||
|
'duration',
|
||||||
|
'durations',
|
||||||
|
'editable',
|
||||||
|
'layers',
|
||||||
|
'modified',
|
||||||
|
'parts',
|
||||||
|
'posterFrame',
|
||||||
|
'rendered',
|
||||||
|
'rightslevel',
|
||||||
|
'size',
|
||||||
|
'streams',
|
||||||
|
'title',
|
||||||
|
'videoRatio'
|
||||||
|
];
|
||||||
|
|
||||||
pandora.getVideoOptions = function(data) {
|
pandora.getVideoOptions = function(data) {
|
||||||
var canPlayClips = data.editable
|
var canPlayClips = data.editable
|
||||||
|| pandora.site.capabilities.canPlayClips[pandora.user.level]
|
|| pandora.site.capabilities.canPlayClips[pandora.user.level]
|
||||||
|
|
Loading…
Reference in a new issue