test/external-widget.htm
author veltr
Tue, 01 Oct 2013 16:57:57 +0200
changeset 1016 e1752b696a07
parent 1001 3210bf928a11
permissions -rw-r--r--
jQuery 1.10 compatibility
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1001
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     1
<!doctype html>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     2
<html>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     3
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     4
    <head>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     5
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     6
        <title>Loading a Widget without the Metadataplayer widgeting framework</title>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     7
        <link href='libs/jquery-ui.css' rel='stylesheet' type='text/css'>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     8
<!--        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
     9
-->        <link href='test.css' rel='stylesheet' type='text/css'>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    10
        <link href='metadataplayer/Controller.css' rel='stylesheet' type='text/css'>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    11
        <script type="text/javascript" src="libs/jquery.min.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    12
        <script type="text/javascript" src="libs/jquery-ui.min.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    13
        <script type="text/javascript" src="libs/underscore-min.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    14
        <script type="text/javascript" src="libs/mustache.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    15
        <script type="text/javascript" src="metadataplayer/LdtPlayer-core.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    16
        <script type="text/javascript" src="metadataplayer/Controller.js" type="text/javascript"></script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    17
        <style type="text/css">
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    18
            #LdtPlayer {
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    19
                width: 640px;
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    20
            }
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    21
        </style>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    22
    </head>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    23
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    24
    <body>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    25
        <h1>Loading a Widget without the Metadataplayer widgeting framework</h1>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    26
        <div id="LdtPlayer">
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    27
            <div id="Ldt-Video"></div>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    28
            <div id="Ldt-Controller"></div>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    29
        </div>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    30
        <script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    31
            var myDir = new IriSP.Model.Directory(),
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    32
                myProject = myDir.remoteSource({
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    33
                    url: "json/ldt-ogv.json",
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    34
                    serializer: IriSP.serializers.ldt
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    35
                });
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    36
            myProject.onLoad(function() {
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    37
                IriSP.htmlPlayer(
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    38
                    myProject.getCurrentMedia(),
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    39
                    $("#Ldt-Video"),
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    40
                    {
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    41
                        width: 640,
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    42
                        controls: true,
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    43
                        autostart: true
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    44
                    }
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    45
                );
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    46
                var controller = new IriSP.Widgets.Controller(null, {
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    47
                    container: "Ldt-Controller",
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    48
                    source: myProject
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    49
                });
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    50
            });
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    51
        </script>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    52
    </body>
3210bf928a11 Enabled loading widgets without the widgeting framework
veltr
parents:
diff changeset
    53
</html>