I've got a perl cgi that generates qtl files that works fine with
Safari. You have to make sure that the mime type is returned as
"application/x-quicktime-reference".
It is important to target quicktime player when using qtl files, and
use an embedded http movie to link to the qtl file (using either the
href parameter or autohref plug-in parameters): Using the object/embed
tag to embed a movie from your web server that references a qtl file
and targets QuickTime Player should work.
Here is the perl script for anyone that is interested. (It is pretty
straight-forward). Since qtl files are just text files, creating them
on the fly with a script can be very useful. This script can be saved
to a text file and placed in your web server's cgi-bin directory with
execute permissions.
# copy an paste this into a text editor
require 5;
use strict;
use CGI;
$CGI::DISABLE_UPLOADS = 1; #disable any attempt to upload file via
this cgi
$CGI::POST_MAX = 512; #set the maximum input for post to 512
bytes
# return the qtl for mov, mp4 or unicast sdp files
print "Content-type: application/x-quicktime-reference\n\n";
print <<XMLHEAD;
<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
XMLHEAD
if (($fullscreen eq "false") || ($fullscreen eq "")) {
# if fullscreen parameter is false use this embed statement
print "<embed src=\"$url\" autoplay=\"$autoplay\"
quitwhendone=\"$quitwhendone\"\/>";
} else {
# if fullscreen parameter is set use this embed statement
# Note: fullscreen .qtl files may not be rendered correctly
print "<embed src=\"$url\" autoplay=\"$autoplay\"
quitwhendone=\"$quitwhendone\" fullscreen=\"$fullscreen\" \/>";
}
exit;
# end of script
It takes 4 parameters (comma separated):
the url of the movie - i.e. rtsp://128.200.200.1/mymovie.mp4
full screen mode (this can be set to normal, full, double, half or
current)
autoplay (true or false)
quitwhendone (true or false)
For example, if my server was 192.168.0.200, the streaming media was
"spiderman.mov", I wanted full screen playback, autoplay, and the
player to stay open, I would use the following tag to embed the link to
my perl script (which I named makeqtlmovie.pl):
In this case, clients would have to click on the "watchnow" movie to
open the qtl file, which launches QT Player in full screen mode. Note
that the fullscreen "full" parameter specified in a qtl doesn't work
properly with versions before QT 6.1. Using "normal" or "current" is
safest.