Turn off Auto play on slide-box


#1

I’m using the slide-box directive in several places in my app and its keeps auto changing the slides. Simple question but is there a way to turn this off? I went digging through the slide-box js and found an auto option, but I think it has something to do with the slide-boxes initiation.

Note, the slides only auto play when does-continue="true" is added to the slide-box

Any ideas?


Wrap around slide box
#2

$scope.slideBox.stop() :smile: I don’t think there’s a way to restart it right now though.

http://codepen.io/anon/pen/fgIAu

EDIT: Hmm it seems to keep going after you go to the next slide… Might make an issue as a feature request for this and the ability to start it up again.

EDIT2: stop() not working is a bug, going to write a failing test for it then push the fix soon.


#3

Ok, so looking at https://github.com/driftyco/ionic/commit/f6ec6a3c89116174541c2fb08194a04ada92065b, perhaps this was intentional. @mhartington I’m going to defer and wait til @andytjoslin is around to take a look, although in my opinion even if does-continue="true" is set, user interaction to go to the next or previous slide should cancel the slideshow.


#4

Well what my understanding of does-continue would do was just to let you loop through the slide shows with buttons or swipes, but not enable an auto play option. If Auto play was an available option, that would be great. In some use cases though, this isn’t a feature that should be enable by default.

If auto play becomes a feature and the user goes to the next slide, there should be a timeout that starts the auto play again if there is no interaction on the slide


#5

I’m a little confused, what was your understanding of how the slidebox should work if does-continue="false"?

I think does-continue is what you are referring to as ‘auto’ play. The slidebox will normally only change slides if the user swipes or clicks a button, if does-continue is set to true then the slidebox will act as a slideshow until the user interacts with it, although I think as you said it could start back up after a certain period of time.

At least that’s what I thought! To be completely frank though I’m not sure now. @max, @adam, @ben, @andytjoslin thoughts?


#6

So I guess this is the best way to explain things.

does-continue=“true” - Lets the user loop through the slides but does not auto-play

auto-play=“true” - Goes though the slide show automatically.


#7

Yes but what does does-continue=“false” mean? They are stuck on one slide? Why have does-continue at all in that case? :slight_smile:

I guess I’m just confused why letting the user loop through a slidebox would ever be optional.

Or by loop do you mean letting them go back to the beginning from the end of the slides?


#8

Yes, by loop I mean letting them go back to beginning from the last slide. I know from pervious use cases that sometimes users like this feature and sometimes they don’t. Sorry for the confusion :smile:


#9

No worries, I wasn’t even thinking about the case of letting them go back to the beginning or not.

This is good though, I think either way the slidebox is a work in progress and we should figure out going forward how it will work.


#10

Ah no problem. For now I’m taking the does-continue option out until it gets “finished” or figured out more.

I work in design and UX during day as a full time job so I’m always willing to help out where I can. :smile:


#11

Hello
Any update on that? I would like to stop the autoplay when it reaches then end of the slideshow (no loop)
Cheers


#12

Also interested in a solution for this. does-continue=“false” does not have the expected effect. or is there another parameter for disabling slidebox wrapping?

*Edit: looks to be fixed in 1.0.0-beta.6

Thanks!


#13

http://ionicframework.com/docs/api/service/$ionicSlideBoxDelegate/#stop


#14

#15

Hey there. Sorry if I bump this thread, but I have the opposite problem: the slideshow doesn’t even start. How can I do to start it? Thank you. :blush: