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

Your preferred username that is used when logging in.

Autoplay playlist with images Created Feb 16, 2009

This thread is solved

Views: 2264     Replies: 3     Last reply Feb 25, 2009  
You must login first before you can use this feature

filledvoid

Posts: 2

Registered:
Feb 16, 2009

Autoplay playlist with images

Posted: Feb 16, 2009

I'm trying to use the playlist feature for a slideshow of images. I'd like the slideshow to automatically advance after showing each image for a few seconds. However, some of the images are quite large (>1MB), and the playlist advances before the image is even displayed. Is there a way for the image duration timer to start *after* the image is displayed? Here's my code:


$f("player", "flowplayer-3.0.5.swf", {		
   clip: {
      autoPlay: true,
      duration: 3
   },
	playlist: [
{ url: 'http://www.example.com/img1.jpg' },
{ url: 'http://www.example.com/img2.jpg' }
	]	
});

Thanks!

fv

filledvoid

Posts: 2

Registered:
Feb 16, 2009

» Autoplay playlist with images

Posted: Feb 17, 2009

Reply to: Autoplay playlist with images, from filledvoid
I think this is a bug in ImageController.as. I think the player should be paused in the doLoad() function, and not resumed until the onLoadComplete() function.

Rather than mess around recompiling it, here's a javascript-only workaround for this:


$f("slideshow", "flowplayer-3.0.5.swf", {
   plugins: {
      controls: {
         url: 'flowplayer.controls-3.0.3.swf',
         autoHide: 'always',
         playlist: true
      },
      loading: {
         url: 'flowplayer.content-3.0.2.swf',
         top: 10,
         left: 10,
         width: 75,
         height: 30,
         display: 'none',
         html: '<p align="center">Loading</p>'
      }
   },
   clip: {
      autoPlay: true,
      useNativeFullScreen: true,
   },
   play: {
      opacity: 0
   },
   playlist: [
      {
      url: 'img1.jpg',
      scaling: 'fit',
      duration: 3,
      onBegin: function() {
         this.getPlugin("play").css({ opacity: 0 });
         this.imageLoaded = false;
      },
      onCuepoint: [0, function(clip, cuepoint) {
         if (!this.imageLoaded) {
            this.getPlugin("loading").show();
            this.pause();
         }
      }],
      onBufferFull: function() {
         if (this.getState() == 4) {
            this.imageLoaded = true;
            this.play();
            this.getPlugin("loading").hide();
         }
      }},
      {
      url: 'img2.jpg',
      scaling: 'fit',
      duration: 3,
      onBegin: function() {
         this.getPlugin("play").css({ opacity: 0 });
         this.imageLoaded = false; },
      onCuepoint: [0, function(clip, cuepoint) {
         if (!this.imageLoaded) {
            this.getPlugin("loading").show();
            this.pause();
         }
      }],
      onBufferFull: function() {
         if (this.getState() == 4) {
            this.imageLoaded = true;
            this.play();
            this.getPlugin("loading").hide();
         }
      }},
      {
      url: 'video1.flv',
      onBegin: function() {
         this.getPlugin("play").css({ opacity: 0 });
         this.getPlugin("loading").show();
      },
      onStart: function() {
         this.getPlugin("loading").hide();
      }},
      {
      url: 'video2.flv',
      onBegin: function() {
         this.getPlugin("play").css({ opacity: 0 });
         this.getPlugin("loading").show();
      },
      onStart: function() {
         this.getPlugin("loading").hide();
      },
      onFinish: function() {
         this.getPlugin("play").css({ opacity: 1 });
      }
   }]
});

When loading an image, the player is paused until the image is actually displayed. As a result, the "play" button doesn't spin as it should; it's the play icon instead. So this hides the play button until the end of the playlist and uses a "content" area to display the progress. It works for images and videos, but I haven't tested it with audio.

fv

Anssi
Flowplayer Flash & video streaming developer

Posts: 818

Registered:
Jul 24, 2007

» » Autoplay playlist with images

Posted: Feb 20, 2009

Reply to: » Autoplay playlist with images, from filledvoid
Seems like there is a bug like you described. This will be fixed for 3.1.

Anssi
Flowplayer Flash & video streaming developer

Posts: 818

Registered:
Jul 24, 2007

fixed in 3.0.6

Posted: Feb 25, 2009

Reply to: » » Autoplay playlist with images, from Anssi
Now it starts tracking the image playback duration only after the image has been fully downloaded.