Video with QuickTime: Difference between revisions
New page: ===Video with QuickTime=== This is quick recipe for adding a popup window that include a Quicktime movie that starts playing immediately. ====First the POP Up Window==== In the HEAD secti... |
|||
| (12 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
=== | These methods of playing QuickTime videos assumes your end customer has a QuickTime player installed. | ||
This is quick recipe for adding a popup window that include a Quicktime movie that starts playing immediately. | This is usually the case of customers running Windows or Macs. Linux customers may need to install a | ||
plug-in. | |||
==The Easiest Method== | |||
Just create a link with the QT video like this: | |||
<a href="mymovie.mp4">Play movie, HTML</a> | |||
When this link is clicked the video will appear in the center of your current window and start playing. | |||
It looks a bit lonely that way, but it's quick and easy. | |||
==Embedded in a page== | |||
Add the following to the page you'd like to have embedded a QT movie: | |||
<embed src="mymovie.mp4" autoplay='FALSE'></embed> | |||
This is load the QT movie, but not start it until they click on the start button. If | |||
you want it to immediately start, set autoplay='TRUE' instead. | |||
==Create a POP up window for a QT movie== | |||
This is a quick recipe for adding a popup window of a nice size that include a Quicktime movie that starts playing immediately. | |||
With the prior two methods your movie can be easily saved. If you want to make that a little harder you can use the | |||
following method. | |||
====First the POP Up Window==== | ====First the POP Up Window==== | ||
| Line 21: | Line 41: | ||
myw.moveTo(10,10); | myw.moveTo(10,10); | ||
} | } | ||
We've set KIOSKMODE to true to add a small amount of security. When KIOSKMODE is set to TRUE, the plug-in does not include | |||
its pop-up menu in the movie controller and does not allow drag and drop to save the movie. Please be aware that there are | |||
many ways of capturing the videos, so don't feel your movies are seriously protected. | |||
====Add the movie==== | ====Add the movie==== | ||
| Line 27: | Line 51: | ||
<script language=JavaScript> | <script language=JavaScript> | ||
<!-- | < !-- | ||
document.write('<a href="javascript:popupTitleURL(\'mymovie.mp4\',\'My Movie\')">Play Movie in a small window</a>'); | |||
//--> | //-- > | ||
</script> | </script> | ||
Latest revision as of 16:53, 9 June 2008
These methods of playing QuickTime videos assumes your end customer has a QuickTime player installed. This is usually the case of customers running Windows or Macs. Linux customers may need to install a plug-in.
The Easiest Method
Just create a link with the QT video like this:
<a href="mymovie.mp4">Play movie, HTML</a>
When this link is clicked the video will appear in the center of your current window and start playing. It looks a bit lonely that way, but it's quick and easy.
Embedded in a page
Add the following to the page you'd like to have embedded a QT movie:
<embed src="mymovie.mp4" autoplay='FALSE'></embed>
This is load the QT movie, but not start it until they click on the start button. If you want it to immediately start, set autoplay='TRUE' instead.
Create a POP up window for a QT movie
This is a quick recipe for adding a popup window of a nice size that include a Quicktime movie that starts playing immediately. With the prior two methods your movie can be easily saved. If you want to make that a little harder you can use the following method.
First the POP Up Window
In the HEAD section of your HTML document, add the following Javascript to open a 240x240 sized window.
<script language="JavaScript">
function popupTitleURL(url, title) {
myw = window.open("", 'crmPopup',
'width=240,height=240,location=no,menubar=no,toolbar=no,scrollbars=yes');
myw.document.write("<HTML><HEAD><TITLE>");
myw.document.write(title);
myw.document.write("</TITLE></HEAD><BODY>");
myw.document.write("<embed src='");
myw.document.write(url);
myw.document.write("' autoplay='true'");
myw.document.write(" KIOSKMODE='True'");
myw.document.write("' width=200 height=200>");
myw.document.write("</embed>");;
myw.document.write("</BODY></HTML>");
myw.moveTo(10,10);
}
We've set KIOSKMODE to true to add a small amount of security. When KIOSKMODE is set to TRUE, the plug-in does not include its pop-up menu in the movie controller and does not allow drag and drop to save the movie. Please be aware that there are many ways of capturing the videos, so don't feel your movies are seriously protected.
Add the movie
In the body of the HTML document add a Javascript call to that function with a URL that points to your Quicktime file.
<script language=JavaScript>
< !--
document.write('<a href="javascript:popupTitleURL(\'mymovie.mp4\',\'My Movie\')">Play Movie in a small window</a>');
//-- >
</script>