Changeset 28592 for main/trunk


Ignore:
Timestamp:
2013-11-02T23:05:04+13:00 (10 years ago)
Author:
davidb
Message:

Changes after testing in preparation for SMAM keynote

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/multimodal-mdl/collect/js-dsp-my-ipod/etc/collectionConfig.xml

    r28470 r28592  
    1919    <gsf:metadata name="exp.Title"/>
    2020    <gsf:metadata name="ex.dc.Title"/>
     21    <gsf:metadata name="ex.ID3.Title"/>
    2122    <gsf:metadata name="ex.Title"/>
    2223    <gsf:metadata name="Title"/>
     
    4950    </level>
    5051    <defaultLevel name="document"/>
     52<!--
    5153    <index name="text">
    5254      <displayItem lang="en" name="name">text</displayItem>
    5355    </index>
    54     <index name="dc.Title,ex.dc.Title,Title">
    55             <displayItem lang="en" name="name">titles</displayItem>
     56-->
     57    <index name="dc.Title,ex.dc.Title,ex.ID3.Title,Title">
     58      <displayItem lang="en" name="name">titles</displayItem>
    5659    </index>
     60    <index name="dc.Creator,ex.dc.Creator,ex.ID3.Artist,Artist">
     61      <displayItem lang="en" name="name">artist</displayItem>
     62    </index>
     63    <index name="salami.overlayNote">
     64      <displayItem lang="en" name="name">annotations</displayItem>
     65    </index>
     66
     67<!--
    5768    <index name="Source">
    5869      <displayItem lang="en" name="name">filenames</displayItem>
    5970    </index>
    60     <defaultIndex name="text"/>
     71-->
     72    <defaultIndex name="dc.Title,ex.dc.Title,ex.ID3.Title,Title"/>
    6173    <searchType name="plain"/>
    6274    <searchType name="simpleform"/>
     
    8496      <xsl:choose>
    8597        <xsl:when test="@rank != 'NaN'">
    86           (<script>
    87             var rank=<xsl:value-of select="@rank"/>;
    88             var perc=(rank-0.9)*100*10;
    89             document.write(perc.toFixed(1));
    90            </script>%)
     98          <script>
     99        if (gs.cgiParams.s == <gsf:quot/>AudioQuery<gsf:quot/>) {
     100              var rank=<xsl:value-of select="@rank"/>;
     101              var perc=(rank-0.9)*100*10;
     102              document.write(<gsf:quot/>(<gsf:quot/>+perc.toFixed(1)+<gsf:quot/>%)<gsf:quot/>);
     103        }
     104          </script>
    91105        </xsl:when>
    92106      </xsl:choose>
     
    129143  </search>
    130144
    131  <infodb type="gdbm"/>
    132 
    133 <!--
    134   <search type="audioDB" orthogonal="true" />
    135 -->
    136  
     145<!--
     146  <search type="jenaTDB" orthogonal="true" />
     147-->
     148
     149 <infodb type="jdbm"/>
     150
    137151  <import>
    138152    <pluginList>
     
    142156      <plugin name="EmbeddedMetadataPlugin">
    143157    <option name="-process_exp" value="(?i)\.mp3$"/>
     158      </plugin>
     159-->
     160
     161<!--
     162  Or to extend the process_exp that is already in use ...
     163<option name="-process_exp" value="(?i)\.(jpe?g|gif|png|tiff|pdf|mp3|wav)$"/>
     164-->
     165
     166<!--
     167      <plugin name="AudioPlugin">
     168    <option name="-converttotype" value="wav"/>
     169    <option name="-enable_streaming" value="mp3"/>
     170    <option name="-enable_cache"/>
    144171      </plugin>
    145172-->
     
    172199  </import>
    173200
    174   <importOption name="OIDtype" value="incremental"/>
     201  <importOptions>
     202    <option name="OIDtype" value="hash_on_full_filename" />
     203  </importOptions>
    175204
    176205  <browse>
    177206    <classifier name="AZCompactList">
    178       <option name="-metadata" value="dc.Title;ex.dc.Title;Title"/>
     207      <option name="-metadata" value="dc.Title;ex.dc.Title;ex.ID3.Title;Title"/>
    179208      <option name="-mingroup" value="2"/>
    180209      <option name="-removeprefix" value="(?i)Le|La|Les|The|A\\s+"/>
     
    182211
    183212    <classifier name="AZCompactList">
    184       <option name="-metadata" value="dc.Creator"/>
     213      <option name="-metadata" value="dc.Creator;ex.dc.Creator;ex.ID3.Artist;Artist"/>
    185214      <option name="-buttonname" value="Artists"/>
    186215      <option name="-mingroup" value="1"/>
     
    337366       
    338367      <xsl:template name="additionalHeaderContent">
    339    
     368    <xsl:variable name="httpCollection">
     369      <xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
     370    </xsl:variable>
     371
    340372
    341373    <xsl:call-template name="soundmanager2-header"/>
     
    351383
    352384    <!-- Javascript support for running, sending input into, monitoring, and stopping Meandre flows -->
     385
    353386    <gsf:script src="ext/meandre/meandre-controller.js"/>
     387
     388    <gsf:style  src="ext/photo-notes/PhotoNotes-1.5.css"/>
     389    <gsf:style  src="ext/photo-notes/annotator.min.css"/>
     390    <gsf:script src="ext/photo-notes/BrowserDetect.js"/>
     391    <gsf:script src="ext/photo-notes/PhotoNotes-1.5.js"/>
     392    <gsf:script src="ext/photo-notes/main-ingest.js"/>
     393    <gsf:script src="ext/photo-notes/main-notes.js"/>
     394    <gsf:script src="{$httpCollection}/script2/main-play-notes.js"/>
    354395
    355396    <gsf:style>
     
    379420    <xsl:variable name="assocFilePath"><gsf:metadata name="assocfilepath" select="root"/></xsl:variable>
    380421    <xsl:variable name="Source"><gsf:metadata name="Source" select="root"/></xsl:variable>
     422
     423    <xsl:variable name="Audio">
     424      <gsf:switch>
     425        <gsf:metadata name='Audio' select="root"/>
     426        <gsf:when test='exists'>
     427          <gsf:metadata name="Audio" select="root"/>
     428        </gsf:when>
     429        <gsf:otherwise>doc.ogg</gsf:otherwise>
     430      </gsf:switch>
     431    </xsl:variable>
     432
     433    <xsl:variable name="streamableaudio">
     434      <gsf:switch>
     435        <gsf:metadata name='streamableaudio' select="root"/>
     436        <gsf:when test='exists'>
     437          <gsf:metadata name="streamableaudio" select="root"/>
     438        </gsf:when>
     439        <gsf:otherwise>doc.mp3</gsf:otherwise>
     440      </gsf:switch>
     441    </xsl:variable>
    381442
    382443    <gsf:variable name="cgiargFrameOffset">
     
    406467    <!-- *** -->
    407468
    408     <div class="documenttext">
     469    <div id="gs-document" class="documenttext">
    409470     
    410471      <xsl:call-template name="audio-icon-cache"/>
     
    418479          <a id="mysong" style="padding-bottom: 2px;"
    419480         onclick="togglePlayVisual(document.getElementById('mainPlayButton'))"
    420          href="{$httpCollection}/index/assoc/{$assocFilePath}/doc.mp3">
     481         href="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}">
    421482        <span>
    422483          <img id="mainPlayButton" src="ext/diy-audio-player/images/play32.png"
     
    469530           
    470531            // At time of writing this code, this needs to be an OGG file to work in Firefox
    471             var source = "</xsl:text><gsf:metadata name="Source" select="root"/><xsl:text disable-output-escaping="yes">";
     532            var source = "</xsl:text><gsf:metadata name="Audio" select="root"/><xsl:text disable-output-escaping="yes">";
    472533           
    473534            var self_sim_png = source.replace(/\.(ogg|mp3|wav)$/,".png");
    474535            var collect = "</xsl:text><xsl:value-of select="/page/pageResponse/collection/@name"/><xsl:text disable-output-escaping="yes">";
     536            var site = "</xsl:text><xsl:value-of select="$site_name"/><xsl:text disable-output-escaping="yes">";
    475537
    476538          </xsl:text>
     
    480542
    481543        <audio style="width: 49%;" id="leftsong" controls="controls" >
     544<!--
    482545          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg" />
    483           <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.mp3" />
     546-->
     547          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}" />
     548          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}" />
    484549          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav" />
    485550        </audio>
    486551        <audio style="width: 49%;" id="rightsong" controls="controls" >
     552<!--
    487553          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg" />
    488           <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.mp3" />
     554-->
     555          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}" />
     556          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}" />
    489557          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav" />
    490558        </audio>
     
    495563          <div style="width: 100%;">       
    496564        <audio id="rta-audio-element" style="width: 100%;">
     565<!--
    497566          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.ogg"/>
    498           <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.mp3"/>
     567-->
     568          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$streamableaudio}"/>
     569          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/{$Audio}"/>
    499570          <source src="{$httpCollection}/index/assoc/{$assocFilePath}/doc.wav"/>
    500571        </audio>
    501572          </div>
    502573         
     574<!--
    503575          <xsl:call-template name="workflow-block"/>
    504 
    505           <div id="controlMarker"/>
    506 
     576-->
     577          <div id="controlMarker"><xsl:comment/></div>
     578
     579          <span id="overlayNewNotes" class="ui-state-default ui-corner-top"
     580            style="font-size:90%; padding: 3px; cursor:pointer;">
     581            New Annotation
     582          </span>     
    507583          <div id="svg-canvas-overlay" style="position: relative">
    508584     
     
    527603          </div>
    528604        </div>
     605
     606
     607        <div style="width: 100%; position: absolute; left: 0px; top: 0px; display: none;">
     608          <div style="position: relative">
     609            <div>
     610              <!-- **** better if 100% width, but issue with JS reading these values ??? -->
     611              <canvas id="selfsim-plot"
     612                  width="941" height="494" style="background-color: #0000cc;"></canvas>
     613            </div>
     614          </div>
     615        </div>
     616
     617
    529618
    530619        <!-- left/right-mix circle cursor -->
     
    570659       
    571660
     661
     662        <gsf:variable-array name="salami.overlayNote">
     663          <gsf:metadata multiple="true" name="salami.overlayNote" separator=", "/>
     664        </gsf:variable-array>
     665
     666<!--
     667               onclick="var event = arguments[0] || window.event; dualPlay(event)"
     668               onmousemove="var event = arguments[0] || window.event; playTrackerMove(event)"
     669               onmouseout="var event = arguments[0] || window.event; playTrackerOff(event)"
     670-->
     671
     672
     673        <div id="noteOverlay"
     674             style="width: 100%; height: 494px; position: absolute; left: 0px; top: 0px; background-color: transparent;">
     675        </div>
     676
     677        <gsf:script>
     678          $(window).load(function(){
     679              var overlayNotes = new OverlayNotes("noteOverlay","salami.overlayNote");
     680              $('#overlayNewNotes').click(function() {overlayNotes.AddNote()});
     681              addStatusBar();
     682            });
     683        </gsf:script>
     684
     685
    572686          </div><!-- end of svg-canvas-overly-->
    573687
     
    583697      </xsl:call-template>
    584698     
     699<!--
    585700      <xsl:call-template name="computed-data">
    586701        <xsl:with-param name="httpCollection" select="$httpCollection"/>
    587702        <xsl:with-param name="assocFilePath" select="$assocFilePath"/>
    588703      </xsl:call-template>
    589 
     704-->
     705
     706<!--
     707      <xsl:call-template name="original-audio">
     708        <xsl:with-param name="httpCollection" select="$httpCollection"/>
     709        <xsl:with-param name="assocFilePath" select="$assocFilePath"/>
     710        <xsl:with-param name="Audio" select="$Audio"/>
     711        <xsl:with-param name="streamableaudio" select="$streamableaudio"/>
     712      </xsl:call-template>
     713
     714      <hr/>
     715-->
    590716
    591717      <hr/>
     
    621747
    622748      soundManager.play(id,options);
     749
     750      var secOffset = msecOffset/1000.0;
     751      console.log("playFromOffset: " + secOffset + " secs -> SoundManager2");
    623752
    624753      togglePlayMode = "pause";
Note: See TracChangeset for help on using the changeset viewer.