Skip to content

Commit 80cd6ee

Browse files
committed
Invoke 360 Image viewer based on metadata
1 parent d4eb6fb commit 80cd6ee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

system/application/views/widgets/mediaelement/jquery.mediaelement.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,15 +2272,13 @@ function YouTubeGetID(url){
22722272
});
22732273

22742274
$(this.image).on('load', function() {
2275-
// Standard practice is that 360 images must be exactly 2:1; alternatively could look for Exif XMP “ProjectionType=equirectangular”
2276-
// Panoramas that aren't 2:1 (e.g., created on a phone) will require a more nuanced look at the metadata to determine if the 360 view should load
2277-
/*if (2 == this.width / this.height && 'annotation_editor' != $('link#view').attr('href')) { // Test for 360 image
2275+
if ('undefined' != typeof(me.model.node.current.properties["http://ns.google.com/photos/1.0/panorama/stitchingsoftware"])) { // Test for 360 image
22782276
me.parentView.mediaContainer.empty();
22792277
me.parentView.mediaObjectView = new $.I360ObjectView(model, parentView);
22802278
me.parentView.mediaObjectView.annotations = me.annotations;
22812279
me.parentView.mediaObjectView.createObject();
22822280
return;
2283-
}*/
2281+
}
22842282
me.doImageSetup(this);
22852283
});
22862284

0 commit comments

Comments
 (0)