Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Dec 5, 2024
1 parent 95bb8cb commit cdfe56b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions code_samples/ai_actions/assets/js/addAudioModule.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { addModule } from '../../vendor/ibexa/connector-ai/src/bundle/Resources/public/js/core/create.ai.module';
import { default as TranscribeAudio } from './transcribe.audio'

addModule(TranscribeAudio );
import { default as TranscribeAudio } from './transcribe.audio';

addModule(TranscribeAudio);
8 changes: 4 additions & 4 deletions code_samples/ai_actions/assets/js/transcribe.audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default class TranscribeAudio extends BaseAIComponent {
}

getAudioInBase64() {
var request = new XMLHttpRequest();
const request = new XMLHttpRequest();
request.open('GET', this.inputElement.href, false);
request.overrideMimeType('text\/plain; charset=x-user-defined');
request.overrideMimeType('text/plain; charset=x-user-defined');
request.send();

if (request.status === 200) {
Expand Down Expand Up @@ -53,9 +53,9 @@ export default class TranscribeAudio extends BaseAIComponent {
}

convertToBase64(data) {
var binary = ""
let binary = '';

for(var i=0;i<data.length;i++){
for (let i = 0; i < data.length; i++) {
binary += String.fromCharCode(data.charCodeAt(i) & 0xff);
}

Expand Down

0 comments on commit cdfe56b

Please sign in to comment.