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
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.
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.
HTML setup for the player
JavaScript coding
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>
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'
autoPlay: false,
autoBuffering: true,
url: 'path/to/video file'
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:
HTML setup for the player
JavaScript coding
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>
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.
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.
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.
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.
Is this bug fixed or what? I'm still having the same problems with autoplay: false, autobuffering: true and the pause button showing...
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>
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]
Reply to:
I have a fix for this problem, from
jmv_66
I have overcome the last problem with this fix:
Please give it a try on your browser/OS combination.
<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.
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.
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.
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
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
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.
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.
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
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
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 ...
});
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).