- Timestamp:
- 2021-09-16T11:10:39+12:00 (3 years ago)
- Location:
- main/trunk/model-interfaces-dev/atea
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/App.vue
r35409 r35411 2 2 <!-- Used to calculate the character size of our monospace font --> 3 3 <span class="monospace-font-sizer">ngÄ tama a rangi</span> 4 5 <audio id="transcriptionAudio" ref="audioPlayer">6 <source id="transcriptionAudioSource" ref="audioPlayerSource" />7 </audio>8 4 9 5 <div class="paper"> … … 76 72 return { 77 73 /** @type {{id: String, url: String} | null} */ 78 currentlyLoadedAudio: null 74 currentlyLoadedAudio: null, 75 player: new Audio() 79 76 } 80 77 }, … … 86 83 }), 87 84 watch: { 88 playbackState(newValue) {85 async playbackState(newValue) { 89 86 if (!newValue.isPlaying) { 90 87 return; … … 92 89 93 90 const transcription = this.transcriptions.get(newValue.id); 94 loadTranscriptionAudio(this. $refs.audioPlayer, this.$refs.audioPlayerSource, transcription, this.currentlyLoadedAudio);91 loadTranscriptionAudio(this.player, transcription, this.currentlyLoadedAudio); 95 92 96 93 let playbackTime = 0; … … 99 96 } 100 97 101 this. $refs.audioPlayer.currentTime = playbackTime;102 this.$refs.audioPlayer.play();98 this.player.currentTime = playbackTime; 99 await this.player.play(); 103 100 }//, 104 101 // shouldPlayAudio(newValue) { … … 112 109 }, 113 110 mounted() { 114 pollAudioTime(this. $refs.audioPlayer, this.$store);111 pollAudioTime(this.player, this.$store); 115 112 } 116 113 } … … 135 132 /** 136 133 * Loads an audio file. 134 * @param {Audio} player The audio player. 137 135 * @param {TranscriptionViewModel} transcription The name of the requested audio file. 138 136 * @param {{id: String, url: String} | null} current The currently loaded audio. 139 137 * @returns {{id: String, url: String}} If a new audio file was loaded, a new audio tracking object, else the current one. 140 138 */ 141 function loadTranscriptionAudio( audioElement, audioElementSource, transcription, current) {139 function loadTranscriptionAudio(player, transcription, current) { 142 140 if (current == null || current.id !== transcription.id) { 143 141 // TODO: Need to profile on some larger tracks; this may not be worth it? Better to cache a URL object instead? … … 147 145 148 146 const urlObject = URL.createObjectURL(transcription.file); 149 audioElementSource.src = urlObject;150 audioElement.load();147 player.src = urlObject; 148 player.load(); 151 149 152 150 return { id: transcription.id, url: urlObject }; -
main/trunk/model-interfaces-dev/atea/resources/interface_atea.properties
r35407 r35411 8 8 atea.TranscriptionItem_ExpandEditor=Playback and Edit 9 9 atea.TranscriptionItem_Download=Download 10 atea.TranscriptionItem_DownloadAsText=Download transcription10 atea.TranscriptionItem_DownloadAsText=Download as text 11 11 atea.TranscriptionItem_DownloadAsJson=Download as JSON 12 12 atea.TranscriptionItem_DownloadAsWebvtt=Download as WebVTT -
main/trunk/model-interfaces-dev/atea/resources/interface_atea_mi.properties
r35407 r35411 8 8 atea.TranscriptionItem_ExpandEditor=Purei Ake me te Whakatika 9 9 atea.TranscriptionItem_Download=Tangohia 10 atea.TranscriptionItem_DownloadAsText=Tangohia te tuhinga tuhi10 atea.TranscriptionItem_DownloadAsText=Tangohia hei tuhinga 11 11 atea.TranscriptionItem_DownloadAsJson=Tangohia hei JSON 12 12 atea.TranscriptionItem_DownloadAsWebvtt=Tangohia hei WebVTT -
main/trunk/model-interfaces-dev/atea/transform/pages/korero-maori-asr.xsl
r35407 r35411 73 73 <strong>We're sorry but the Korero Maori ASR interface doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> 74 74 </noscript> 75 xxx=<xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'atea.AudioUpload_SelectFileText')" />76 75 77 76 <div id="app"></div>
Note:
See TracChangeset
for help on using the changeset viewer.