background preloader

Get info from page

Facebook Twitter

Plug-in Basics - MDC. How Plug-ins are used Plug-ins offer a rich variety of features that can increase the flexibility of Gecko-based browsers.

Plug-in Basics - MDC

Plug-ins like these are now available: multimedia viewers such as Adobe Flash and Adobe Acrobat utilities that provide object embedding and compression/decompression services applications that range from personal information managers to games The range of possibilities for using plug-in technology seems boundless, as shown by the growing numbers of independent software vendors who are creating new and innovative plug-ins. With the Plug-in API, you can create dynamically loaded plug-ins that can: register one or more MIME types draw into a part of a browser window receive keyboard and mouse events obtain data from the network using URLs post data to URLs add hyperlinks or hotspots that link to new URLs draw into sections on an HTML page communicate with JavaScript/DOM from native code.

Drawing and Event Handling - MDC. This chapter tells how to determine whether a plug-in instance is windowed or windowless, how to draw and redraw plug-ins, and how to handle plug-in events.

Drawing and Event Handling - MDC

When it comes to determining the way a plug-in instance appears in a web page, you (and the web page author) have many options.

Header

Thumbshot. Icon. Observers. X-FRAME-OPTIONS. Get the content of an Iframe in Javascript – crossbrowser soluti. Ok, let’s imagine the use case: I have an iframe somewhere on my page, and when I click a link or a button I need to get the content of it (could be a textarea e.g.), and then do some stuff with it. It was easy to do this in IE, but for Firefox I struggled more, as I kept getting the “frame has no properties” error message in the console. And when I solved this I couldn’t get to the content. There is a lot of references out there claiming that you could use document.frames['nameOfMyIframe'] or window.frames['nameOfMyIframe'] to get the frame, and then use the .innerHTML to get the content, but both are wrong.

I came up with the following function that seems to do the job in both Firefox (tested on version 2.0.0.11 and 3.03 ) and in IE (6 and 7): This wasn’t my biggest contribution, but I spent some time trying to find this solution, and for some of you it might be helpful saving you frome some heavy googling. Main.html: Frame.html: Manipulating video using canvas - MDC. By combining the capabilities of the video element with a canvas, you can manipulate video data in real time to incorporate a variety of visual effects to the video being displayed.

Manipulating video using canvas - MDC

This tutorial, adapted from this blog post by Paul Rouget, demonstrates how to perform chroma-keying (also known as the "green screen effect") using JavaScript code. View this live example. Using audio and video in Firefox - MDC. HTML5 introduces built-in media support via the <audio> and <video> elements, offering the ability to easily embed media into HTML documents.

Using audio and video in Firefox - MDC

Embedding media in your HTML document is trivial: <video src=" controls> Your browser does not support the <code>video</code> element. </video> This example plays a sample video, with playback controls, from the Theora web site. Here is an example for embedding audio into your HTML document <audio src="/test/audio.ogg"><p>Your browser does not support the <code>audio</code> element.

NsIDOMHTMLMediaElement - MDC. Video - MDC. Summary The HTML <video> element is used to embed video content in an HTML or XHTML document.

Video - MDC

For a list of supported formats, see Media formats supported by the audio and video elements. Usage context Attributes Like all other HTML elements, this element supports the global attributes. autoplay A Boolean attribute; if specified, the video will automatically begin to play back as soon as it can do so without stopping to finish loading the data. autobuffer A Boolean attribute; if specified, the video will automatically begin buffering even if it's not set to automatically play.

Implementation note: though part of the early drafts of the HTML5 specification, the autobuffer attribute has been removed in later releases. Buffered An attribute you can read to determine which time ranges of the media have been buffered. Controls If this attribute is present, Gecko will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback. crossorigin anonymous src.

Display First Frame Of Video. Embed Object. Flash OBJECT and EMBED tag attributes. To view/add comments, you must enable JavaScript in your browser. This document lists the attributes of the OBJECT and EMBED tags used to publish SWF (Flash-enabled) content in HTML pages for display in web browsers. The attributes allow you to specify certain parameters that control the details of how and where Flash Player displays the SWF file in the browser. Information about including Flash-enabled (SWF file) content within web pages is also available in the TechNote OBJECT tag syntax | Flash (tn_4150). Required attributes.