Link to home
Start Free TrialLog in
Avatar of Bigflicks
Bigflicks

asked on

How to play pre roll mid roll and post roll video in flash cs3 using AS3

Currently I am using JW FLV PLayer 4.0 and I want to play pre roll ad, mid roll ad, post roll ad. Please tell me how is it possible. if you need any assistance to JW FLV PLAYER website. (www.jeroenwijering.com)

Avatar of lherrou
lherrou
Flag of Ukraine image

Bigflicks,

You'll need to set up an XML playlist, which the JW player supports, and set to autoplay. Break your main video into two parts, where you want the mid roll ad to go.

Your XML file will look like the one below...

If you don't want the movie to start immediately when the page is called, set up your javascript to call it once a screen image of the movie in the player is clicked on (in other words, make a pic that looks like the movie in the player, when the user clicks on it, load the actual player with playlist and autoplay enabled).

Cheers,
LHerrou
<?xml version='1.0' encoding='UTF-8' ?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>pre ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>segment 1</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>mid ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>segment 2</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>end ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
</trackList>
</playlist>

Open in new window

Avatar of Bigflicks
Bigflicks

ASKER

we have thousands of video file so we are not going to break the video and then play mid roll, we want to play mid roll without breaking our flv file.
 
 
Well...  The basic idea is to read the time value for the mid roll from the XML file and run the counter as soon as the video starts...  Pause the video when the time comes, and load the mid roll on top of the current video...  Have it play till the end and unload the mid roll... and resume the video...  That's what you are looking for, right???

I don't think I have seen a freeware that supports mid roll and I don't think JW one is doing that for you either...  You basically need to create your own player that implements the functionality...  That's my 2 cents...

CyanBlue
I concur, JW is a great player but it won't do what you want out of the box. You can purchase it and modify the source to pause and play as CyanBlue describes. You also might want to look at the Earth Science Agency player, which is also customizable (http://components.earthscienceagency.com/components/flvplayer/)
Well, I don't know what Bigflicks ended up doing, but CyanBlue and I offered some information and advice here, that was never fully responded to.
ASKER CERTIFIED SOLUTION
Avatar of Bigflicks
Bigflicks

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial