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,
|
||||
$title, $player, $controls, $timeline, $annotations;
|
||||
|
||||
pandora.api.get({id: ui.item, keys: [
|
||||
'duration', 'durations', 'layers', 'parts', 'posterFrame',
|
||||
'rightslevel', 'size', 'title', 'videoRatio'
|
||||
]}, function(result) {
|
||||
pandora.api.get({id: ui.item, keys: pandora.VIDEO_OPTIONS_KEYS}, function(result) {
|
||||
if (removed) {
|
||||
return;
|
||||
}
|
||||
video = Ox.extend(result.data, pandora.getVideoOptions(result.data));
|
||||
|
||||
Ox.print('OPTIONS::::::::', options)
|
||||
var isFrame = options['in'] && options['in'] == options.out,
|
||||
sizes = getSizes();
|
||||
|
||||
|
@ -363,8 +359,8 @@ pandora.ui.embedPlayer = function() {
|
|||
|
||||
that.resizePanel = function() {
|
||||
var sizes = getSizes();
|
||||
$player.options({width: window.innerWidth, height: sizes.videoHeight});
|
||||
$outerPanel.size(0, sizes.innerHeight);
|
||||
$player && $player.options({width: window.innerWidth, height: sizes.videoHeight});
|
||||
$outerPanel && $outerPanel.size(0, sizes.innerHeight);
|
||||
options.showTimeline && $timeline.options({width: window.innerWidth - 16});
|
||||
options.showAnnotations && $annotations.options({width: window.innerWidth});
|
||||
return that;
|
||||
|
|
|
@ -19,10 +19,7 @@ pandora.ui.embedTimeline = function() {
|
|||
video,
|
||||
$title, $panel, $player, $annotations;
|
||||
|
||||
pandora.api.get({id: ui.item, keys: [
|
||||
'duration', 'durations', 'layers', 'parts', 'posterFrame',
|
||||
'rightslevel', 'size', 'title', 'videoRatio'
|
||||
]}, function(result) {
|
||||
pandora.api.get({id: ui.item, keys: pandora.VIDEO_OPTIONS_KEYS}, function(result) {
|
||||
if (removed) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -12,12 +12,7 @@ pandora.ui.item = function() {
|
|||
|
||||
pandora.api.get({
|
||||
id: pandora.user.ui.item,
|
||||
keys: isVideoView ? [
|
||||
'audioTracks',
|
||||
'cuts', 'duration', 'durations', 'editable', 'layers',
|
||||
'modified', 'parts', 'posterFrame', 'rendered', 'rightslevel',
|
||||
'streams', 'size', 'videoRatio',
|
||||
].concat(pandora.site.itemTitleKeys) : []
|
||||
keys: isVideoView ? Ox.unique(pandora.VIDEO_OPTIONS_KEYS.concat(pandora.site.itemTitleKeys)) : []
|
||||
}, pandora.user.ui.itemView == 'info' && pandora.site.capabilities.canEditMetadata[pandora.user.level] ? 0 : -1, function(result) {
|
||||
|
||||
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) {
|
||||
var canPlayClips = data.editable
|
||||
|| pandora.site.capabilities.canPlayClips[pandora.user.level]
|
||||
|
|
Loading…
Reference in a new issue