You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Scrollable autoscroll autoplay issues Created Dec 11, 2009

This thread is solved

Views: 5696     Replies: 11     Last reply Dec 28, 2010  
You must login first before you can use this feature

-Alex-

Posts: 1

Registered:
Dec 10, 2009

Scrollable autoscroll autoplay issues

Posted: Dec 11, 2009

I've been having a few issues with two aspects of scrollable and autoscroll, I'm trying to get the autoscroll working on page load - but it's impossible to use the API to stop the autoscroll for the first item.

First case (autoplay enabled)
var video_scroller = $(".scrollable").scrollable().autoscroll({api: true});

// In some other code:
video_scroller.stop();

In this case it's impossible to stop the scroller for the first item only in the scrollable. The autoplay code in scrollable.autoscroll uses setTimeout, so until the first item has moved off you can't use .stop().

Second case (autoplay disabled, use .play() to start)
var video_scroller = $(".scrollable").scrollable().autoscroll({autoplay: false, api: true});
video_scroller.play();

The scrollable immediately moves and then starts with the delay before the next move. In this case .stop() works properly. Is the initial move working as intended? Possibly, although in my opinion the functionality of autoplay should be identical to using .play(). If someone wants it to move immediately then they should use .move(x) then .play() afterwards.

Suggested changes:

api.play = function() {

	// do not start additional timer if already exists
	if (timer) { return; }
	
	stopped = false;
	
	// construct new timer
	timer = setInterval(function() { 
		api.move(opts.steps);				
	}, opts.interval);
	
	// Remove this
	//api.move(opts.steps);
};

// and...

if (opts.autoplay) {
	api.play();
	// Remove this
	//setTimeout(api.play, opts.interval);				
}

This would make autoplay identical to play(), although for some users it might be a change in the expected functionality.

Thoughts?

andrnag

Posts: 1

Registered:
Feb 19, 2010

Cool!

Posted: Feb 19, 2010

Reply to: Scrollable autoscroll autoplay issues, from -Alex-
Alex, Thanks for sharing! It's really what I need.

2developers: please take it to release, this behavior is much better.

custa1200

Posts: 54

Registered:
Oct 31, 2009

» Cool!

Posted: Mar 1, 2010

Reply to: Cool!, from andrnag
Added to issues register

FutureKode

Posts: 15

Registered:
Jan 20, 2010

» » Cool!

Posted: Jul 23, 2010

Reply to: » Cool!, from custa1200
was this issue fixed? stop() doesn't work for a lot of people still.

http://flowplayer.org/tools/forum/20/44060#post-46425

http://github.com/jquerytools/jquerytools/issues/unreads#issue/10

http://github.com/jquerytools/jquerytools/issues/closed#issue/15

Jeff_C

Posts: 5

Registered:
Aug 24, 2010

» Scrollable autoscroll autoplay issues

Posted: Aug 24, 2010

Reply to: Scrollable autoscroll autoplay issues, from -Alex-
Does anyone know if this bug will ever be fixed? It was marked as fixed in v1.2.4 but it is still broken in scrollable :(

See the "fixed" bug herehttp://github.com/jquerytools/jquerytools/issues/closed#issue/107

Jeff_C

Posts: 5

Registered:
Aug 24, 2010

» » Scrollable autoscroll autoplay issues

Posted: Aug 24, 2010

Reply to: » Scrollable autoscroll autoplay issues, from Jeff_C
It's not elegant, but as a quick hack I did the following:

I first load scrollable with autoplay disabled. Since play() forces the item to the next item, I then reload the first item (yes, I know it sucks, but until this bug is fixed, I'm all out of ideas).

Starting with Alex's "second case" above, I modified it slightly by adding seakTo() back to the first item:

var video_scroller = $(".scrollable").scrollable().autoscroll({autoplay: false, api: true});
video_scroller.play();
video_scroller.seekTo(0,0);

If anyone has a better solution (or if the bug is ever fixed), feel free to post a followup here.

Jeff_C

Posts: 5

Registered:
Aug 24, 2010

» Scrollable autoscroll autoplay issues

Posted: Aug 30, 2010

Reply to: Scrollable autoscroll autoplay issues, from -Alex-
I don't know if the following bug will be ignored as well (or closed without being fixed), but I've posted another bug/issue. Hopefully it will get noticed.

By the way, I tried the core changes you suggested above and they do work. Good call (hopefully the admins will see it - maybe before an entire year passes from the original posting :).

http://github.com/jquerytools/jquerytools/issues/issue/154

Jeff_C

Posts: 5

Registered:
Aug 24, 2010

» » Scrollable autoscroll autoplay issues

Posted: Sep 11, 2010

Reply to: » Scrollable autoscroll autoplay issues, from Jeff_C
They fixed it. Yeay! :)

http://github.com/jquerytools/jquerytools/issues/issue/154