Eh, whatever... I'll send this to the group.
Here's the php script (attached .txt file... just rename to .php).
Feel free to add in the embed code for SWF and FLV.
If you have any scripting experience this should be really straightforward.

Enjoy!

-Josh


---------- Forwarded message ----------
From: Joshua Kinberg <[EMAIL PROTECTED]>
Date: Jan 12, 2006 12:27 PM
Subject: Re: [videoblogging] Re: Vlogging with Flash - nice pop-up generator!
To: videoblogging@yahoogroups.com


The PHP script is really simple. If you have any basic scripting
experience it should be a cake-walk. I was going to include it in the
Vlogging Hacks book, but then that got cancelled. It may be included
in one of the other Vlogging books that either Jay, or Ryanne and
Verdi are working on.

I can send it to you offlist... I haven't looked at it in a while and
I don't really have time to provide much support.

-Josh


On 1/12/06, Joe Chapuis <[EMAIL PROTECTED]> wrote:
>
>
> Josh --
>
> I like that pop-up generator!
>
> I switched from QT to Flash 8 as my primary format,
> but I'd like to offer other options via pop-up windows.
> Your solution is just what I was thinking about.
>
> Is the PHP script available?
>
> Thanks...
> joe
> http://www.hotbizz.com
>
>
>
> --- In videoblogging@yahoogroups.com, Joshua Kinberg <[EMAIL PROTECTED]> 
> wrote:
> >
> > I think the whole argument that Flash has the most ubiquity is a bit of a
> myth.
> > Rocketboom has always been embedded Quicktime. They have a huge daily
> audience.
> > No one ever complains that they can't see the Quicktime video. Of
> > course they provide other formats too because some people prefer them.
> > Honestly, the myth that Quicktime isn't supported is more because
> > people use Internet Explorer on Windows, which sort of sabotages
> > Quicktime playback (it will not "fast start" quicktime unless it is
> > properly embedded in an HTML page). My answer to this is to use pop-up
> > windows with the video embedded, and I wrote a simple code generator
> > so that people can do it easily:
> >
> > http://joshkinberg.com/popupmaker
> >
> > Try it, enter the URL of a video file, add some of the other info if
> > you want and watch what happens. The link will pop up a small window
> > with the video embedded. It works for Windows Media too. I could
> > probably add FLV support as well, just haven't taken the time to do
> > it.
> >
>
>
>  ________________________________
>  YAHOO! GROUPS LINKS
>
>
>  Visit your group "videoblogging" on the web.
>
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>  ________________________________
>


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/videoblogging/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
<?php

if ($_GET['url'])
        $url = $_GET['url'];
        
if ($_GET['size'])
        $size = $_GET['size'];
else
        $size = 320;
        
$width = $size;
$height = round(($size/4)*3);

// get file extension
$url_array = split("/", $url);  
$filename = $url_array[sizeof($url_array)-1];
$file_array = explode(".", $filename);
$file_ext = strtolower($file_array[sizeof($file_array)-1]);

?>

<html>
<head>

<title>Video</title>

<style>
body {
        background-color: #000000;
        text-align: center;
        margin: 0px;
        padding: 0px;
        color:#CCCCCC;
        font-size:12px;
        font-family: Arial, Verdana, Helvetica, sans-serif;
}

a {
        font-size:12px;
        color:#CCCCCC;
        text-decoration:none;
}

a:hover {
        text-decoration: underline;
}

#video {
        height: 100%;
        margin: auto;
        padding: 15px; auto;
}

</style>
</head>

<body>
<div id="video">
<?php

// print HTML embed code for each file type
switch ($file_ext) {
        case "mov":
        case "mp4":
        case "qt":
        case "smil":
        case "3gp":
        case "mpg":
        case "mpeg":
        case "m4v":
        case "mp3":
        case "wav":
        case "aiff":
        case "aac":
        case "m4b":
                $height = $height + 16;
                $html =<<<END
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
width="$width" height="$height" 
codebase="http://www.apple.com/qtactivex/qtplugin.cab";>
<param name="src" value="$url">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="scale" value="aspect">
<embed src="$url" 
        width="$width" height="$height" 
        autoplay="true" 
        controller="true" 
        scale="aspect"
        pluginspace="http://www.apple.com/quicktime/download/";>
</embed>
</object>
END;
                break;
                
        case "wmv":
        case "avi":
                $height = $height + 46;
                $html =<<<END
<object id="MediaPlayer1" 
width="$width" height="$height" 
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112";
standby="Loading..."
type="application/x-mplayer2">
<param name="fileName" value="$url">
<param name="showControls" value="true">
<param name="showTracker" value="true">
<embed type="application/x-mplayer2" name="MediaPlayer1" 
pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"; 
width="$width" height="$height" 
showControls="true" showTracker="true"
src="$url">
</embed>
</object>
END;
                break;
                
        case "swf":
        
                break;
        case "flv":
        
                break;
}

echo $html;
echo "<br/>";
/*
echo "Resize: <a href=\"" . $_SERVER['PHP_SELF'] . "?url=" . $url . 
"&size=320\">320x340</a> | <a href=\"" . $_SERVER['PHP_SELF'] . "?url=" . $url 
. "&size=640\">640x480</a></div>";
*/
?>
</div>
</body>
</html>

Reply via email to