Using JavaScript to Call a Movie
Apple currently recommends using JavaScript to call movies. It all started because a company called Eolas sued Microsoft for making ActiveX components automatic. In January of 2006, Microsoft changed IE so that users had to click to activate ActiveX controls (like the QuickTime plugin). Although QuickTime movies should play in the background even without clicking (like Windows Media Player files do), they don’t. Apple found that you can get QuickTime movies to play without user activation if you call the movie with JavaScript as shown here.
To use JavaScript to call a QuickTime movie:
1. | Create a new text file for your JavaScript script.
|
2. | In the JavaScript text file, type function InsertSampleMovie( ) { to ... |
Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.