Changeset 222

Show
Ignore:
Timestamp:
04/15/08 20:29:56 (9 months ago)
Author:
Stuart Thiel
Message:

-Fixed #185

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • MediAnnotateXPI/trunk/srcExtension/chrome/vertov/content/overlay.js

    r217 r222  
    153153   
    154154  getPlayableURL: function() { 
    155         var url = this.item.getField('url');; 
    156                 if(this.isMediaAnnotation) url = this.parentItem.getField('url'); 
    157                 else if(this.item.isRegularItem()) { 
    158                         var snapID = this.item.getBestSnapshot(); 
    159                         if (snapID) { 
    160                                 url = Zotero.Items.get(snapID).getLocalFileURL(); 
    161                         }   
    162                 } 
    163         return url; 
     155        var url = this.getBestPlayableURL(this.item); 
     156        if(this.isMediaAnnotation) url = this.getBestPlayableURL(this.parentItem); 
     157    return url; 
     158  }, 
     159   
     160  getBestPlayableURL: function(item) { 
     161        url = item.getLocalFileURL(); 
     162        if(!url) url = item.getField('url'); 
     163        if(item.isRegularItem()) { 
     164                var snapID = this.item.getBestSnapshot(); 
     165                if (snapID) { 
     166                        url = Zotero.Items.get(snapID).getLocalFileURL(); 
     167                }  
     168        } 
     169    return url; 
    164170  }, 
    165171