OK here's a very dirty nasty working hack that will give you pre or post roll. Be warned it is not for the faint hearted!!
It also has a nasty side effect - more on that later - but the point is it can be done!
You'll need to manually create your play list.
You'll need to manually alter your database.
You'll need to alter /includes/player.inc
If you're not already having kittens and the lure of filthy ad revenue has filled your eyes ... I'll begin.
Let's do the easy stuff first;
1. BACK EVERYTHING UP!!!! - you've been warned - I was glad I did!
2. Open /include/player.inc and add
Code:
so.addVariable("repeat", "list");
just after
Code:
so.addVariable("autostart", "false");
3. upload your pre or post roll advert in flv format into your /flvideo folder and make a note of what it's called.
4. Open your database in phpmyadmin or whatever
5. Look for the video you want to add your pre or post roll add to and note down the 'vid' and the 'flvdoname'
6. Open up notepad and copy this code into it
Code:
<?xml version="1.0" encoding="utf-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>[Pre Roll Title]</title>
<creator>Details</creator>
<location>http://[FULL-URL-TO]/flvideo/[ADVERT-TITLE].flv</location>
<image>http://[FULL-URL-TO-MAIN-VIDEO-IMAGE].jpg</image>
</track>
<track>
<title>[Main Video Title]</title>
<creator>[Details]</creator>
<location>http://http://[FULL-URL-TO]/flvideo/[flvdoname].flv</location>
<image>http://[FULL-URL-TO-MAIN-VIDEO-IMAGE].jpg</image>
</track>
</trackList>
</playlist>
You'll obviously need to change the bits in between [ & ] and there can be no gap on the first line :)
7. Save this file as 'vid'.xml (where vid is the id of your main video which you are adding your pre or post roll to).
8. Upload 'vid'.xml into your /flvideo folder
9. Back to you database and change/edit your video flvdoname to 'vid'.xml
10 Go to your site and play your video :)
NOTES:
Security - you can call your 'vid'.xml file anything you want - I've just outlined it this way for simplicity.
Proof of concept at
Code:
http://1.ef7.co.uk/view/18/carly-cunningham-promo-sample/
(I make no appologies for the dodgy preroll - I was in a hurry)
The nasty side effect: If you stop the video during the pre-roll then the next person gets a post roll.
So there we have it. It can be done. Now if we can get it built in so we can upload post and pre roll ads from the db ....
What do you think?
Kev
Bookmarks