Jump to content

[SOLVED] Switching finished video to still image


Nuccah

Recommended Posts

I've been trying to find an answer for this for hours, but haven't had much luck.

 

I have a video that plays on my website. When it ends, there is nothing but a black space (final frame of the video I believe). I'd like for an image to take the place of the video when the video ends (no looping). I just haven't been able to find the right code for it.

 

Any help is greatly appreciated.

Link to comment
Share on other sites

is the video played in a flash player or what? if so then that's a question of flash, not PHP.

I imagined there would be some kind of php coding that would allow an image to take the place of the video when it was done playing?

 

If not, then I'll delete the thread

Link to comment
Share on other sites

Flash has event listeners http://livedocs.adobe.com/flash/mx2004/main_7_2/00001596.html which can trigger a function when the video ends.. and then you can simply show an image over the video... no need to go down the php root...

 

 

flash also has a clear() function which clears the last shot of the video when it stops: http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary819.html

 

 

Link to comment
Share on other sites

It really does matter whether or not you are using Flash.  I'm going to assume that you are, and you have the source for the flash player.  What you can do, is use the flash externalAPI which allows you to call a javascript function.  Check this out, and maybe google a bit:  http://www.adobe.com/devnet/flash/articles/external_interface_05.html

 

So conceptually, what you need to accomplish this is have a function that does some magic in the location of the video. One option might be to have a background image and you hide the player, or perhaps fool with the z-index of overlapping divs, where your javascript function moves the image to the front.

 

Also in flash you need to have an event listener that fires this code when the video is done.

 

Conceptually, this is possible with flash, but in this case I have never tried to implement this idea, so I'm afraid it's only my best guess in regards to making this work.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.