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

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

Issue 2305623003: Support to repeat one song in Audio Player. (Closed)
Patch Set: Created 4 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
Index: ui/file_manager/audio_player/js/audio_player.js
diff --git a/ui/file_manager/audio_player/js/audio_player.js b/ui/file_manager/audio_player/js/audio_player.js
index 37921756298226caa7dda29c35c0cdb3214be925..509f29c9c894bbde1475a4ec27d71ddf94900161 100644
--- a/ui/file_manager/audio_player/js/audio_player.js
+++ b/ui/file_manager/audio_player/js/audio_player.js
@@ -61,6 +61,9 @@ function AudioPlayer(container) {
// Update the UI by loaded state.
for (var storageKey in results) {
var key = storageKey.substr(STORAGE_PREFIX.length);
+ if(key === 'repeat' && typeof results[storageKey] === 'boolean') {
fukino 2016/09/02 12:11:48 Let's make new key 'repeat-mode' for the string va
harukam 2016/09/05 04:35:03 Acknowledged.
+ results[storageKey] = results[storageKey] ? "repeat-all" : "repeat-none";
+ }
this.player_[Polymer.CaseMap.dashToCamelCase(key)] = results[storageKey];
}
// Start listening to UI changes to write back the states to local storage.

Powered by Google App Engine
This is Rietveld 408576698