Presentation is loading. Please wait.

Presentation is loading. Please wait.

© De Montfort University, 2004 1 Javascript control of players Howell Istance.

Similar presentations


Presentation on theme: "© De Montfort University, 2004 1 Javascript control of players Howell Istance."— Presentation transcript:

1 © De Montfort University, 2004 1 Javascript control of players Howell Istance

2 © De Montfort University, 2004 2 Downloading Important to understand history of multimedia rendering (streaming is not always an efficient solution) IE have used ActiveX controls represented in an tag Netscape have used plugins represented in an tag W3C use tag – will not validate XHTML strict (and using it is therefore out)

3 © De Montfort University, 2004 3 Object tag… OBJECT has content, but content is NOT the media element content only displayed if user-agent is unable to display the object Here’s some text because B has failed too

4 © De Montfort University, 2004 4 Example of use of Object tag.. <OBJECT data = “movies/clip2.mov” type = “video/quicktime”> <OBJECT data = “images/still2.jpg” type = “image/jpg”> A 5 second video clip

5 © De Montfort University, 2004 5 Example of use of Object tag.. <object height=“400” width=“400” type="application/x-oleobject" classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6> <embed src="static.avi" type="application/x-mplayer2" width="400" height="400" autoplay="true" pluginspage= "http://www.microsoft.com/Windows/MediaPlayer">

6 © De Montfort University, 2004 6 MIME Multi-purpose Internet Mail Extensions File extensions are not reliable as a means of identifying type of content, different operating systems use different conventions General form: Content-type: type/subtype –text/html –text/plain –image/gif –application/postscript –video/x-ms-wm x- prefix to subtype indicates ‘experimental’ MIME type

7 © De Montfort University, 2004 7 Using the Object element ‘Param’ field enables values to be assigned to variables defined by the player and separate from the browser Define the mime type of the clip to be played Netscape now support 1 (and only 1) ActiveX control (Windows Media Player) in NS7.1 Means that same object definition can be used for both IE and NS

8 © De Montfort University, 2004 8 Span elements and id attributes this is some text, doesn’t really matter what this is some text, doesn’t really matter what Methods and properties of object accessed via name “pText” New object “oneword” of class span created with text node “doesn’t”, parent is “pText”

9 © De Montfort University, 2004 9 MS DOM (internet Explorer) applets all anchors embeds forms filters images links plugins styleSheets scripts frames plugins collection body screen document history navigator location event document object window Key

10 © De Montfort University, 2004 10 Javascript control of players Necessary to know what the attributes and methods in the player API are in order to be able to call these in Javascript. Likely that the methods for plugins (in Netscape) will be different from the ActiveX control method used in IE Give the object an id (id =“myplayer”) and use this to reference the attributes and methods myplayer.url=“http://someserver.com/soundclip.wav” myplayer.play();


Download ppt "© De Montfort University, 2004 1 Javascript control of players Howell Istance."

Similar presentations


Ads by Google