Changeset 247


Ignore:
Timestamp:
07/22/09 23:10:45 (4 years ago)
Author:
jeroen
Message:

added indexing to the example setups, plus scripting so one could directly link to them

Location:
testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • testing/index.html

    r224 r247  
    1111                        /** Insert a new example in the page. **/ 
    1212                        insert: function(evt) { 
    13                                 evt.preventDefault(); 
    14                                 var obj = settings.examples[$('#examples :selected').text()]; 
     13                                if(evt) { evt.preventDefault(); } 
     14                                var obj = settings.examples[$('#examples').val()]; 
    1515                                var arr = []; 
    1616                                if(obj['plugins']) { 
     
    2323                        /** Fill out the flashvars with example data. **/ 
    2424                        fillout: function(set) { 
    25                                 var obj = settings.examples[$('#examples :selected').text()]; 
     25                                var obj = settings.examples[$('#examples').val()]; 
    2626                                var arr = $("#"+set).find('input'); 
    2727                                for(var i=0; i<arr.length; i++) { 
     
    197197                                } 
    198198                                alert(txt); 
     199                        }, 
     200                        /** Preload the appropriate example. **/ 
     201                        loadExample: function() { 
     202                        var rgx = '[^/]+$'; 
     203                        var res = (new RegExp(rgx)).exec(window.parent.location.href); 
     204                        if(res) { 
     205                                        $('#examples').val(res[res.length-1]); 
     206                                        $.insert(); 
     207                                } 
    199208                        } 
    200209                }); 
     
    212221                for (dct in settings) { 
    213222                        for (itm in settings[dct]) { 
    214                                 $("#"+dct).append("<option>"+itm+"</option>"); 
     223                                if(dct == 'examples') { 
     224                                        var tit = (settings[dct][itm]['title']) ? itm+". "+settings[dct][itm]['title'] : ''; 
     225                                        $("#"+dct).append("<option value='"+itm+"'>"+tit+"</option>"); 
     226                                } else {         
     227                                        $("#"+dct).append("<option>"+itm+"</option>"); 
     228                                } 
    215229                        } 
    216230                } 
    217231                $.tabs(); 
     232                $.loadExample(); 
    218233                $('#examplesform').css('display','block'); 
    219234                $('#sources').css('display','block'); 
  • testing/settings.js

    r246 r247  
    7272        /** All the setup examples with their flashvars. **/ 
    7373        examples: { 
    74                 '== Choose an example ==': {}, 
    75                 'FLV video': { 
     74                1: { 
     75                        title:'FLV video', 
    7676                        file:'../../testing/files/bunny.flv', 
    7777                        image:'files/bunny.jpg', 
     
    7979                        width:400 
    8080                }, 
    81                 'MP4 video': { 
     81                2: { 
     82                        title:'MP4 video', 
    8283                        file:'../../testing/files/bunny.mp4', 
    8384                        image:'files/bunny.jpg', 
     
    8586                        width:400 
    8687                }, 
    87                 'MP3 audio': { 
     88                3: { 
     89                        title:'MP3 audio', 
    8890                        file:'files/bunny.mp3', 
    8991                        height:20, 
    9092                        width:400 
    9193                }, 
    92                 'AAC audio': { 
     94                4: { 
     95                        title:'AAC audio', 
    9396                        file:'../../testing/files/bunny.m4a', 
    9497                        height:20, 
    9598                        width:400 
    9699                }, 
    97                 'JPG image': { 
     100                5: { 
     101                        title:'JPG image', 
    98102                        file:'files/bunny.jpg', 
    99103                        height:240, 
    100104                        width:400 
    101105                }, 
    102                 'PNG image': { 
     106                6: { 
     107                        title:'PNG image', 
    103108                        file:'files/bunny.png', 
    104109                        height:240, 
    105110                        width:400 
    106111                }, 
    107                 'Youtube video': { 
     112                7: { 
     113                        title:'Youtube video', 
    108114                        file: 'http://youtube.com/watch?v=IBTE-RoMsvw', 
    109115                        height: 240, 
    110116                        width: 400 
    111117                }, 
    112                 ' ': { 
    113                 }, 
    114                 'ASX playlist': { 
     118                10: {}, 
     119                11: { 
     120                        title:'ASX playlist', 
    115121                        file:'files/asx.xml', 
    116122                        height:240, 
     
    119125                        playlistsize:400 
    120126                }, 
    121                 'ATOM playlist': { 
     127                12: { 
     128                        title:'ATOM playlist', 
    122129                        file:'files/atom.xml', 
    123130                        height:240, 
     
    126133                        playlistsize:400 
    127134                }, 
    128                 'iRSS playlist': { 
     135                13: { 
     136                        title:'iRSS playlist', 
    129137                        file:'files/irss.xml', 
    130138                        height:240, 
     
    133141                        playlistsize:400 
    134142                }, 
    135                 'mRSS playlist': { 
     143                14: { 
     144                        title:'mRSS playlist', 
    136145                        file:'files/mrss.xml', 
    137146                        height:240, 
     
    140149                        playlistsize:400 
    141150                }, 
    142                 'SMIL playlist': { 
     151                15: { 
     152                        title:'SMIL playlist', 
    143153                        file:'files/smil.xml', 
    144154                        height:240, 
     
    147157                        playlistsize:400 
    148158                }, 
    149                 'XSPF playlist': { 
     159                16: { 
     160                        title:'XSPF playlist', 
    150161                        file:'files/xspf.xml', 
    151162                        height:240, 
     
    154165                        playlistsize:400 
    155166                }, 
    156                 '  ': { 
    157                 }, 
    158                 'Different colors (to test skins)': { 
     167                20: {}, 
     168                21: { 
     169                        title:'Different colors', 
    159170                        file:'files/bunnies.xml', 
    160171                        height:240, 
     
    167178                        screencolor:'FFFFFF' 
    168179                }, 
    169                 'Logo, title and no click': { 
     180                22: { 
     181                        title:'Logo, title and no click', 
    170182                        file:'files/bunnies.xml', 
    171183                        height:240, 
     
    178190                        controlbar:'over' 
    179191                }, 
    180                 'Autostart, shuffle and repeat': { 
     192                23: { 
     193                        title:'Autostart, shuffle and repeat', 
    181194                        file:'files/bunnies.xml', 
    182195                        repeat:'always', 
     
    191204                        playlistsize:400 
    192205                }, 
    193                 'Stretched, stacked and muted': { 
     206                24: { 
     207                        title:'Stretched, stacked and muted', 
    194208                        file:'files/bunnies.xml', 
    195209                        stretching:'fill', 
     
    201215                        playlistsize:400 
    202216                }, 
    203                 'Loading from config xml': { 
     217                25: { 
     218                        title:'Loading from config xml', 
    204219                        config:'files/config.xml', 
    205220                        height:240, 
    206221                        width:500 
    207222                }, 
    208                 'Start and duration flashvars': { 
     223                26: { 
     224                        title:'Start and duration flashvars', 
    209225                        file:'files/bunny.mp3', 
    210226                        height:20, 
     
    215231                        autostart:'true' 
    216232                }, 
    217                 '        ': { 
    218                 }, 
    219                 'RTMP streamed FLV': { 
     233                30: {}, 
     234                31: { 
     235                        title:'RTMP streamed FLV', 
    220236                        file:'vdoxadmin/jeroen/bunny.flv', 
    221237                        streamer:'rtmp://fl9.maelstrom.jet-stream.nl:80/vod/', 
    222238                        type:'rtmp', 
    223                         title:'RMP streamed FLV', 
    224                         displaytitle:'true', 
    225                         height:240, 
    226                         width:400 
    227                 }, 
    228                 'RTMP streamed MP3': { 
     239                        height:240, 
     240                        width:400 
     241                }, 
     242                32: { 
     243                        title:'RTMP streamed MP3', 
    229244                        file:'vdoxadmin/jeroen/bunny.mp3', 
    230245                        streamer:'rtmp://fl9.maelstrom.jet-stream.nl:80/vod/', 
    231246                        type:'rtmp', 
    232                         title:'RTMP Streamed MP3', 
    233                         displaytitle:'true', 
    234247                        height:20, 
    235248                        width:400 
    236249                }, 
    237                 'HTTP streamed FLV': { 
     250                33: { 
     251                        title:'HTTP streamed FLV', 
    238252                        file:'bunny.flv', 
    239253                        streamer:'http://www.longtailvideo.com/jw/embed/xmoov.php', 
    240254                        type:'http', 
    241                         title:'HTTP streamed FLV', 
    242                         displaytitle:'true', 
    243                         height:240, 
    244                         width:400 
    245                 }, 
    246                 'Bitgravity streamed FLV': { 
     255                        height:240, 
     256                        width:400 
     257                }, 
     258                34: { 
     259                        title:'Bitgravity streamed FLV', 
    247260                        file:'http://bitcast-a.bitgravity.com/botr/ifNSlhVa/videos/ntPYsD4L-326.flv', 
    248261                        type:'bitgravity', 
    249                         title:'Bitgravity streamed FLV', 
    250262                        displaytitle:'true', 
    251263                        height:240, 
    252264                        width:400 
    253265                }, 
    254                 'Bitgravity streamed MP4': { 
     266                35: { 
     267                        title:'Bitgravity streamed MP4', 
    255268                        file:'http://bitcast-a.bitgravity.com/botr/ifNSlhVa/videos/ntPYsD4L-327.mp4', 
    256269                        type:'bitgravity', 
    257                         title:'Bitgravity streamed MP4', 
    258                         displaytitle:'true', 
    259                         height:240, 
    260                         width:400 
    261                 }, 
    262                 'Highwinds streamed FLV': { 
     270                        height:240, 
     271                        width:400 
     272                }, 
     273                36: { 
     274                        title:'Highwinds streamed FLV', 
    263275                        file:'http://hwcdn.net/x7z8b2t5/fms/bunny.flv', 
    264276                        type:'highwinds', 
    265                         title:'Highwinds streamed FLV', 
    266                         displaytitle:'true', 
    267                         height:240, 
    268                         width:400 
    269                 }, 
    270                 'Limelight/Akamai live stream': { 
     277                        height:240, 
     278                        width:400 
     279                }, 
     280                37: { 
     281                        title:'Limelight/Akamai live stream', 
    271282                        file:'live24x7', 
    272283                        type:'fcsubscribe', 
    273284                        streamer:'rtmp://llnwpm.fc.llnwd.net/llnwpm', 
    274                         title:'Limelight/Akamai live stream', 
    275                         displaytitle:'true', 
    276                         height:240, 
    277                         width:400 
    278                 }, 
    279                 'S3 Authenticated video': { 
     285                        height:240, 
     286                        width:400 
     287                }, 
     288                38: { 
     289                        title:'S3 Authenticated Video', 
    280290                        file:'http%3A%2F%2Fcontent.longtailvideo.com%2Fvideos%2Fauthenticate.flv%3FAWSAccessKeyId%3DAKIAIMO2UYBVC6GA3WYQ%26Expires%3D1279755021%26Signature%3DOESMzl5TB%252Ff7rrSs18%252B52nPy9ww%253D', 
    281                         title:'S3 Authenticated Video', 
    282291                        type:'video', 
    283                         displaytitle:'true', 
    284                         height:240, 
    285                         width:400 
    286                 }, 
    287                 '   ': { 
    288                 }, 
    289                 'Audiodescription and captions plugins': { 
     292                        height:240, 
     293                        width:400 
     294                }, 
     295                50: {}, 
     296                51: { 
     297                        title:'Audiodescription and captions plugins', 
    290298                        file:'../../testing/files/corrie.flv', 
    291299                        height:240, 
     
    295303                        'audiodescription.file':'files/corrie.mp3' 
    296304                }, 
    297                 'Autostarter plugin': { 
     305                52: { 
     306                        title:'Autostarter plugin', 
    298307                        file:'files/bunny.mp3', 
    299308                        height:20, 
     
    301310                        plugins:'autostarter' 
    302311                }, 
    303                 'Captions plugin (embedded captions)': { 
     312                53: { 
     313                        title:'Captions plugin (embedded captions)', 
    304314                        file:'../../testing/files/bunny.mp4', 
    305315                        height:240, 
     
    307317                        plugins:'captions' 
    308318                }, 
    309                 'Clickproxy plugin': { 
     319                54: { 
     320                        title:'Clickproxy plugin', 
    310321                        height:240, 
    311322                        width:800, 
     
    314325                        'clickproxy.listener':'$.alert' 
    315326                }, 
    316                 'HD plugin': { 
     327                55: { 
     328                        title:'HD plugin', 
    317329                        file:'../../testing/files/bunny.flv', 
    318330                        height:240, 
     
    321333                        'hd.file':'../../testing/files/bunny.m4v' 
    322334                }, 
    323                 'Livestream plugin': { 
     335                56: { 
     336                        title:'Livestream plugin', 
    324337                        file:'../../testing/files/bunny.flv', 
    325338                        height:260, 
     
    330343                        'livestream.streamer':'rtmp://fl9.maelstrom.jet-stream.nl:80/vod/' 
    331344                }, 
    332                 'Metaviewer plugin': { 
     345                57: { 
     346                        title:'Metaviewer plugin', 
    333347                        file:'../../testing/files/bunny.flv', 
    334348                        height:260, 
     
    340354                        'metaviewer.size':400 
    341355                }, 
    342                 'Revolt plugin': { 
     356                58: { 
     357                        title:'Revolt plugin', 
    343358                        file:'files/bunny.mp3', 
    344359                        height:260, 
     
    348363                        'revolt.gain':2 
    349364                }, 
    350                 'Searchbar plugin': { 
     365                59: { 
     366                        title:'Searchbar plugin', 
    351367                        file:'../../testing/files/bunny.flv', 
    352368                        image:'files/bunny.jpg', 
     
    357373                        'searchbar.script':'files/bunnies.xml' 
    358374                }, 
    359                 'Sharing plugin': { 
     375                60: { 
     376                        title:'Sharing plugin', 
    360377                        dock:true, 
    361378                        file:'../../testing/files/bunny.flv', 
     
    366383                        'sharing.link':'http://www.bigbuckbunny.org/' 
    367384                }, 
    368                 'Snapshot plugin': { 
     385                61: { 
     386                        title:'Snapshot plugin', 
    369387                        file:'../../testing/files/bunny.m4v', 
    370388                        height:260, 
     
    373391                        'snapshot.script':'http://www.jeroenwijering.com/test/snapshot/create.php' 
    374392                }, 
    375                 '    ': { 
    376                 }, 
    377                 'Playlist with streamers': { 
     393                80: {}, 
     394                81: { 
     395                        title:'Playlist with streamers', 
    378396                        file:'files/streamers.xml', 
    379397                        height:240, 
     
    384402                        lightcolor:'77AA22' 
    385403                }, 
    386                 'Playlist with chapters': { 
     404                82: { 
     405                        title:'Playlist with chapters', 
    387406                        file:'files/chapters.xml', 
    388407                        height:240, 
     
    394413                        lightcolor:'77AA22' 
    395414                }, 
    396                 'Playlist from youtube': { 
     415                83:{ 
     416                        title:'Playlist from youtube', 
    397417                        file:'http://gdata.youtube.com/feeds/api/standardfeeds/recently_featured?v=2', 
    398418                        height:240, 
Note: See TracChangeset for help on using the changeset viewer.