Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: ui/file_manager/video_player/js/video_player.js

Issue 574293002: Files.app: Show thumbnail of non-image file even when the file cache is present (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/thumbnail_loader.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index 9de5a55cc954fe53c182b4f21d766a5376a24ad5..ebbc09d75c14035f99f2d5a0f98ecb41b270a990 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -315,8 +315,12 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
.then(function(results) {
var url = results[0];
var token = results[1];
- document.querySelector('#thumbnail').style.backgroundImage =
- 'url(' + url + '&access_token=' + token + ')';
+ if (url && token) {
+ document.querySelector('#thumbnail').style.backgroundImage =
+ 'url(' + url + '&access_token=' + token + ')';
+ } else {
+ document.querySelector('#thumbnail').style.backgroundImage = '';
+ }
})
.catch(function() {
// Shows no image on error.
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/thumbnail_loader.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698