Chromium Code Reviews| 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 b941805ccdc13c36163bf96b1d00ac8921ec3a69..8ec36daef235af685cec126c4bb4b11ae68e5c8a 100644 |
| --- a/ui/file_manager/video_player/js/video_player.js |
| +++ b/ui/file_manager/video_player/js/video_player.js |
| @@ -320,8 +320,12 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) { |
| 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 + ')'; |
|
mtomasz
2014/09/17 09:29:48
Can we append the access token in C++? I'm working
yoshiki
2014/09/17 09:57:09
I'll do it. But please leave it as it is at this t
|
| + } else { |
| + document.querySelector('#thumbnail').style.backgroundImage = ''; |
| + } |
| }).catch(function() { |
| // Shows no image on error. |
| document.querySelector('#thumbnail').style.backgroundImage = ''; |