NPAPI Core Animation Movie Plugin

Last Revision:
Version 1.0, 2011-09-06
A modern scripted NPAPI plugin which uses the Core Animation drawing model and Cocoa Event model.
Build Requirements:
Xcode 4 or later, Safari 5.0 or later
Runtime Requirements:
Safari 5.0 or later

This sample illustrates how to create a modern Netscape-style plugin using NPAPI. It queries for the Core Animation drawing model and the Cocoa Event model, and enables those technologies if available. This sample includes an HTML page which embeds the included plug-in to play a movie. The movie can be played and paused by clicking HTML buttons that script into the plugin. This plugin also captures keyboard events, so the playback state can also be toggled by pressing the space bar.

This plugin sample is provided for instructional purpose only. If you need to play video in a web page, you should consider an HTML5 <video> solution.