Widget (HTML Package)

From open-smil
Jump to: navigation, search

Widget (HTML Package) is a zipped file with file name extension ".wgt". It must contain a file named "index.html" at the top level of the zipped folder. To create an HTML Package, all related files (html, css, java script, media content, etc) are needed to be copied to the same folder. Then zip this folder and change its file extension to "*.wgt"

Example:

<ref src="widget/clock_widget.wgt" region="regionA">
clock_widget.wgt will be downloaded to internal storage and played locally.

Parameters

In some cases, parameters are needed to be sent to HTML package like HTML's "GET" method:

  http://yourhost/index.html?name1=value1&name2=value2
Widget also supports "playing HTML file with parameters". Parameters will be sent to target Widget by using _Param_ in the ref tags:
    <ref src="widget/clock_widget.wgt" region="regionA">
        <param name="color" value="red"/>
        <param name="city" value="London"/>
    </ref>
Parameters "color" and "city" are sent to the Widget.

Related