Ignore:
Timestamp:
2013-12-05T22:52:51+13:00 (10 years ago)
Author:
davidb
Message:

Latest version of Firefox now supports Web-Audio, but the written JS files for Greenstone (for audio) don't seem to play nicely. Make it use the Firefox audio extension for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/multimodal-mdl/collect/salami-ground-truth/script2/hybrid-audio-player.js

    r28433 r28746  
    5656}
    5757
     58// Latest Firefox now seems to natively support Web audio, but doesn
     59// seem to play nicely with the work here
     60// => set webAudioContext back to null to force it to use the
     61//    original Firefox audio extension
     62var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
     63if (is_firefox) {
     64  webAudioContext = null;
     65}
    5866
    5967// ******
     
    151159}
    152160
    153 
    154 allData = gs.documentMetadata["json.data"];
     161// Fake the allData array -- First value is ground-truth => make empty
     162//allData = [ [], JSON.parse(gs.documentMetadata["json_seriesData"]) ];
     163
     164// Set up position zero as empty "ground truth" data
     165allData = [ [] ];
    155166
    156167// ****
     
    159170// 'p.yScaleSimImg;, which presumably automatically generates
    160171// gs.cgiParams.yScaleSimImg (if present).  Defaults to 0.5
    161 
     172   
    162173yScaleSimImg=gs.variables.cgiargYScaleSimImg || 0.5;
    163174
     
    165176
    166177
     178
    167179$(function() {
     180
     181
    168182
    169183    var audio = document.getElementById('rta-audio-element');
Note: See TracChangeset for help on using the changeset viewer.