This is a message.

player initially shows pause button on autoPlay: false Created Oct 2, 2009

This thread is solved

Views: 5013     Replies: 17     Last reply Aug 7, 2011  
You must login first before you can use this feature

masterjj

Posts: 14

Registered:
Sep 29, 2009

player initially shows pause button on autoPlay: false

Posted: Oct 2, 2009

Flowplayer 3.1.3 initially displays a "pause" button in the control bar when loaded with a clip with autoPlay property set to false. The normal behaviour would be to display a "play" button in this case.

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» player initially shows pause button on autoPlay: false

Posted: Oct 2, 2009

Reply to: player initially shows pause button on autoPlay: false, from masterjj
Are you sure? Click on the splash image below, and you see a play button once the player is loaded.

Flowplayer forum example

HTML setup for the player

<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.8.js"></script>

<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
	<img src="path/to/splash_image" />
</a>


JavaScript coding

Following script will install Flowplayer into our player container


<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.11.swf",{
clip: {
  autoPlay: false
}
});
</script>


masterjj

Posts: 14

Registered:
Sep 29, 2009

» » player initially shows pause button on autoPlay: false

Posted: Oct 2, 2009

Reply to: » player initially shows pause button on autoPlay: false, from blacktrash
Right in your case, but the problem occurs with the following settings :

autoPlay: false,
autoBuffering: true,
url: 'path/to/video file'

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» » » player initially shows pause button on autoPlay: false

Posted: Oct 2, 2009

Reply to: » » player initially shows pause button on autoPlay: false, from masterjj
Yes. A valid bug then ;-) Until it is fixed try the following workaround:

Flowplayer forum example

HTML setup for the player

<!-- include latest Flowplayer javascript file -->
<script language="javascript" src="path/to/flowplayer-3.2.8.js"></script>

<!-- player container with optional splash image -->
<a href="path/to/video_file" id="playerContainer">
	<img src="path/to/splash_image" />
</a>


JavaScript coding

Following script will install Flowplayer into our player container


<script language="javascript">
// our custom configuration is given in third argument
flowplayer("playerContainer", "path/tohttp://releases.flowplayer.org/swf/flowplayer-3.2.11.swf",{
clip: {
  autoPlay: false,
  autoBuffering: true
},
onLoad: function () {
  this.pause();
}
});
</script>


masterjj

Posts: 14

Registered:
Sep 29, 2009

» » » » player initially shows pause button on autoPlay: false

Posted: Oct 3, 2009

Reply to: » » » player initially shows pause button on autoPlay: false, from blacktrash
Not so easy !
This setting works (displays "Play" button):
-------------
autoPlay: false,
autoBuffering: true,
url: http://e1p1.simplecdn.net/flowplayer/flowplayer-700.flv"
-------------
This setting does not work (displays "Pause" button):
-------------
autoPlay: false,
autoBuffering: true,
url: http://e1h13.simplecdn.net/flowplayer/flowplayer.flv"
-------------
The only difference is the video file !!
Adding
onLoad: function () {
this.pause();
}
does not change anything in either case.

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» » » » » player initially shows pause button on autoPlay: false

Posted: Oct 3, 2009

Reply to: » » » » player initially shows pause button on autoPlay: false, from masterjj
I feared as much ;-(

onLoad might be too early. I agree that this should be fixed, but meanwhile you could try clip's onBegin or onStart events for pausing.

web00132

Posts: 17

Registered:
Oct 14, 2009

What"s happening?!

Posted: Feb 15, 2010

Reply to: » » » » » player initially shows pause button on autoPlay: false, from blacktrash
Is this bug fixed or what? I'm still having the same problems with autoplay: false, autobuffering: true and the pause button showing...

jmv_66

Posts: 3

Registered:
Feb 26, 2010

I have a fix for this problem

Posted: Feb 26, 2010

Reply to: What"s happening?!, from web00132
This fixed the "pause" bug for me in Safari, FF, and IE. Can others test it and let me know if it works for them:


<script>
	flowplayer("player", "flowplayer.swf", {
		clip:  {
			autoPlay: false,
			autoBuffering: true,
			onStart: function () { this.stop(); } 
		}	
	});
</script>

jmv_66

Posts: 3

Registered:
Feb 26, 2010

Oops - issue with my suggested fix...

Posted: Feb 26, 2010

Reply to: I have a fix for this problem, from jmv_66
I just realized in testing further that this fix works fine until the video has played through one time. If the user tries to play again, the video won't play. Back to the drawing board.... [shrug]

jmv_66

Posts: 3

Registered:
Feb 26, 2010

Okay, now this fix seems to work better...

Posted: Feb 26, 2010

Reply to: I have a fix for this problem, from jmv_66
I have overcome the last problem with this fix:


<script>
	flowplayer("player", "flowplayer.swf", {
		clip:  {
			autoPlay: false,
			autoBuffering: true,
			onStart: function () {
				if (this.getState() == 4) { this.stop(); }
			}
		}
	});
</script>

Please give it a try on your browser/OS combination.

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» Okay, now this fix seems to work better...

Posted: Feb 27, 2010

Reply to: Okay, now this fix seems to work better..., from jmv_66
You can also use this.isPaused(). Yes, according to my quick testing this seems to succeed.

It's still a workaround though as the autoPlay: false autoBuffering: true combination works only for progressive download. Admittedly it doesn't make sense for rtmp, still, what happens is that the scroller becomes unusable. Probably autoBuffering should be forced to false with streaming protocols.

stevebro

Posts: 9

Registered:
Aug 10, 2009

» Okay, now this fix seems to work better...

Posted: Feb 27, 2010

Reply to: Okay, now this fix seems to work better..., from jmv_66
Thanks jmv_66, your (this.getState() == 4) fix worked with me in safari and firefox.

But what confuses me is that there's a flicker when the first frame loads. This never used to happen with flowplayer-3.1.3

Can I go back to 3.1.3 and still have it work on all platforms and browsers. I'm only using progressive downloads.

Blacktrtash, I couldn't get your code to work

Thanks
steve

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» » Okay, now this fix seems to work better...

Posted: Feb 28, 2010

Reply to: » Okay, now this fix seems to work better..., from stevebrowne
Strange. (this.isPaused()) should be a synonym for (this.getState() == 4). Perhaps you forgot a parenthesis?

In between 3.1.3 and 3.1.5 the loading mechanism has changed, probably overall for the better, but apparently not for this corner case. Anyway, it is a bug.

stevebro

Posts: 9

Registered:
Aug 10, 2009

» » » Okay, now this fix seems to work better...

Posted: Feb 28, 2010

Reply to: » » Okay, now this fix seems to work better..., from blacktrash
Thanks Blacktrash, That's good. I'll use that one as its simpler to understand

With 3.1.5 I'm also having to put cachebusting: true to be able to play the movie twice in firefox

I hope 3.1.6 sorts out all this stuff quickly

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» » » » Okay, now this fix seems to work better...

Posted: Feb 28, 2010

Reply to: » » » Okay, now this fix seems to work better..., from stevebrowne
Well, for the time being, you can confine cachebusting just to IE by doing:


$f("container", {
  src: "/path/to/flowplayer.swf",
  cachebusting: /MSIE/.test(navigator.userAgent)
}, {
  // player config ...
});

Christian Ebert
Flowplayer support

Posts: 3024

Registered:
May 27, 2008

» » » » Okay, now this fix seems to work better...

Posted: Mar 12, 2010

Reply to: » » » Okay, now this fix seems to work better..., from stevebrowne
FWIW, replay with Firefox seems to work ok w/o cachebusting here (Firefox 3.6 Mac).

jpriebe

Posts: 19

Registered:
Oct 23, 2008

» » » » player initially shows pause button on autoPlay: false

Posted: Mar 12, 2010

Reply to: » » » player initially shows pause button on autoPlay: false, from blacktrash
I'm seeing this problem with the latest svn code (checked out this morning).

Hope this gets fixed soon!