Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

156
Visualizações
How do we load a WebVtt file in React?

This is my data structure

WEBVTT

00:00:15.000 --> 00:00:17.951 At the left we can see...

00:00:18.166 --> 00:00:20.083 At the right we can see the...

00:00:20.119 --> 00:00:21.962 ...the head-snarlers

I am trying to parse a web vtt file. For this I wrote :

     var data = require('./captions.en.vtt');

Error

client:47 ./src/captions.en.vtt Module parse failed: C:\Users\sampr\Desktop\MyVIew\WebVtt\src\captions.en.vtt Invalid number (3:0) You may need an appropriate loader to handle this file type.

Could someone please help me?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You need a appropriate loader for the file type (.vtt).

Install file-loader (npm install --save-dev file-loader) and you could use it directly like this:

var data = require('file-loader!./captions.en.vtt');
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda