Update Modello web samples from upstream; version up
[profile/ivi/sdk/web-sample-build.git] / samples / web / Sample / Tizen / Web App / MediaPlayer / project / js / imageControls.js
1 /*
2  * Copyright (c) 2013, Intel Corporation.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 var slideshowInterval;
11
12 ImageControls = function()
13 {
14     this.paused = true;
15 }
16
17 ImageControls.prototype.play = function()
18 {
19     this.paused = false;
20     $("#playButton").toggleClass('playing', true);
21     $("#navigationButtons").hide();
22     slideshowInterval = setInterval(function(){
23         nextButtonClick();
24     }, 3000);
25 }
26
27 ImageControls.prototype.pause = function()
28 {
29     this.paused = true;
30     $("#playButton").toggleClass('playing', false);
31     $("#navigationButtons").show();
32     clearInterval(slideshowInterval);
33 }