Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions WhisperTS/src/WhisperTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class WhisperTS extends IntuifaceElement {

private parser = new UAParser(navigator.userAgent);
private isSafari = this.parser.getBrowser().name.includes('Safari') || this.parser.getBrowser().name.includes('WebKit');
private isTizen = navigator.userAgent.includes('Tizen')

private isiOS = false;
private osInitialized = false;
Expand Down Expand Up @@ -161,7 +162,7 @@ export class WhisperTS extends IntuifaceElement {

this.audioChunks = [];

if (this.isSafari || this.isiOS)
if ((this.isSafari || this.isiOS) && !this.isTizen)
this.rec.start(1000);
else
this.rec.start();
Expand Down Expand Up @@ -213,7 +214,7 @@ export class WhisperTS extends IntuifaceElement {
}
// if safari browser then use the mimeType of the MediaRecorder
// otherwise for the audio/wav
const mimeType = (this.isSafari || this.isiOS) ? this.rec.mimeType : 'audio/wav';
const mimeType = ((this.isSafari || this.isiOS) && !this.isTizen) ? this.rec.mimeType : 'audio/wav';
// get the blob from chunks with the right type
const audioBlob = new Blob(this.audioChunks, { type: mimeType });
// Raise trigger to provide access to audio recording
Expand Down