Closed (fixed)
Project:
Embed
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2009 at 22:23 UTC
Updated:
9 Sep 2014 at 19:45 UTC
Jump to comment: Most recent
The code samples here are indicative - as the module is under active development the format might change. Also, Drupal 7 isn't yet fixed and that might result in some changes. However, code samples are probably useful to get a quick overview of what is happening here.
Comments
Comment #1
Stuart Greenfield commentedInserting some basic flash:
The flash content is placed on the page, using the preferred handler. Currently have a choice of direct embedding, or SWF Object 2.
Comment #2
Stuart Greenfield commentedInserting ogg audio using the new HTML5 audio tag:
The audio object is placed on the page user the browser media player. Providing the controls attribute via object data causes the player controls to be shown. Note that this attribute is passed via #object_data as controls is NOT an attribute of an HTML object, only an HTML audio tag. If we were handling ogg via a different player (maybe flash) then the player might use a different name in a flashvar to represent the same concept. If we follow HTML5 and always use this attribute as part of #object_data then all possible handler modules know where to find this attribute and can behave accordingly.
Comment #3
Stuart Greenfield commentedComplex example intended to show that it is actually relatively easy to build up complex behaviour. This uses the prototype flowplayer module to render the following series of content in flowplayer. The content is a mixture of video types. Note it uses the poster attribute (HTML5 video) in #object_data to set a thumbnail. It also uses the stream attribute to set some streamed content.
Result is the content rendered in to a flowplayer playlist. This is arguably what SWF Tools does now, but that relies on the use of either an input filter, or a call to the swf() function. This new approach could handle objects coming from any provider - all the provider has to do is describe an object.
Comment #4
aaron commentedlooks good -- we should leverage this for remote php stream wrappers
Comment #5
dave reidModule is being re-purposed, see #2327977: Transfer ownership of the embed module to Dave Reid.