220 likes | 374 Views
PLUG INS. flash, quicktime, java applets, etc. Browser Plug-ins. Netscape wanted a method to extend features of the browser became an unofficial standard Later, Microsoft added Active-X controls unprecedented # of security problems it is more secure than it used to be. Plug-in Future.
E N D
PLUG INS • flash, quicktime, java applets, etc
Browser Plug-ins • Netscape wanted a method to extend features of the browser • became an unofficial standard • Later, Microsoft added Active-X controls • unprecedented # of security problems • it is more secure than it used to be
Plug-in Future • todays will be around a long time • XML namespaces allow any number of XML formats to be combined in the SAME document • Plug-ins will adapt into XML file type handlers with tight HTML integration
Issues • Browser without the plug-in will either • bug the user about it • ignore it • Users don’t like to install plug-ins • beginners are afraid & should be • advanced users are skeptical
Issues • Browser can’t be trusted to educate the user! • Plug-ins lower browser stability and can waste resources • Plug-ins add more security holes, can weaken the OS too • Plug-in quality/support differs
Issues • Users could BLAME YOU for plug-in related problems • Inconvenience can scare users away • Often plug-in content takes more bandwidth or SLOW page loading (java) • Without alternatives, you lock out users
Flash Issues • Flash 7+ can use a microphone or webcam • initially, they were on by default! • Its not easy to check the settings • Flash has LARGE cookies it can store outside browser cookies • Advertisers are using flash to watch you
Flash Benefits • REALLY GOOD browser integration • Javascript cross communication • Used to hack in support in older browsers • Fonts, javascript audio, PDF, video • SVG: http://code.google.com/p/svgweb
Flash Threat • SVG: OPEN xml version of Vector Graphics • HTML 5: video, audio, javascript, 2D, 3D • DOM3: more options than Flash • Java Applets - historically poorly treated • Most potential for missing abilities
What’s the tag? • <embed> • IE 5.5 and higher no longer support <embed> • xHTML 1+ killed <embed> • <object> • is the FUTURE - ( including JAVA applets)
How do I do it? • Read plug-in author’s directions • <embed> tags are easy, but SKIP USING THEM • <object> tags are complex and have many parameters you can pass to the plug-in • Most plug-ins have tools out there to aid in generating the HTML
Backward Support • HTML 4 : Use BOTH for 90s browsers • XHTML: • Use XHTML transitional and use both • Validators will not be happy but OLD browsers will handle it • Provide alternatives; old browsers likely don’t have the plug-in
Java • Java applets are slow to load • Run anywhere; no extra plug-ins • Secure + great track record • Must check what version java of java they have (in the java applet) • Java is no longer installed by default in Windows
Plug-ins in use • All video/audio formats are plug-ins • Common: .mp3 .mp4 .avi .wav • Flash is often installed BY DEFAULT • Java is common but often not installed • PDF not very common (yet)
Alternatives • Direct file link • NO plug-in: download the file (might auto open the file too) • If plug-in: displayed in the browser • Link to alternate formats (manual or auto)
Javascript • Some plug-ins support javascript access • allows you to manipulate the object; or just talk to it...it depends. • documentation is often located at the developer’s website • Java applets support it • Quicktime (video control, even editing!)
Checking for a plug-in • Browser Object: • navigator.plugins • plugins is an array of plug-ins • you loop thru it and compare names: • if (navigator.plugins) { • for (i=0; i < navigator.plugins.length; i++ ) { • if (navigator.plugins[i].name.indexOf("QuickTime") >= 0) • { haveqt = true; } • } • }
Example http://www.apple.com/quicktime/authoring/embed.html • <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="100" width="100"> • <param name="src" value="(EmptyReference!)"> • <param name="autoplay" value="true"> • <param name="controller" value="false"> • <embed height="100" pluginspage="http://www.apple.com/quicktime/download/" src="videofile.mp4" type="video/quicktime" width="100" controller="false" autoplay="true"> • </object>
HTML 5 • <audio> & <video> • <source src=”” type=”MIME type” /> • MP3, MP4, OGG, WAV, MIDI,MOV • Multiple types can be listed at 1 time • does NOTHING without properties or javascript to cause it to play
<audio id="oneup"> • <source src="1UP.mid" type="audio/midi" /> • <source src="1UP.ogg" type="audio/ogg" /> • <source src="1UP.wav" type="audio/xwav" /> • </audio> • <button onclick=”document.getElementById(‘oneup’).play()”> • click me • </button>
Graceful HTML5 • <audio> <video> if supported: • <source> is used • OTHER tags are ignored • If not supported: • OTHER tags are used - use <object> • If object doesn't work, it should show HTML