Giter Site home page Giter Site logo

srt2vtt's Introduction

srt2vtt's People

Contributors

deestan avatar mikkeloscar avatar xat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

srt2vtt's Issues

Codepage error

Im getting this error when trying to execute your example script.
`C:\Users\user\Desktop\subs\node_modules\srt2vtt\node_modules\codepage\cputils.js:109
mdb.length = 2 * len;
^

TypeError: Cannot set property length of [object Object] which has only a getter
at sbcs_d (C:\Users\user\Desktop\subs\node_modules\srt2vtt\node_modules\codepage\cputils.js:109:20)
at Object.decode (C:\Users\user\Desktop\subs\node_modules\srt2vtt\node_modules\codepage\cputils.js:397:40)
at Object.convertToUTF8 (C:\Users\user\Desktop\subs\node_modules\srt2vtt\encoding.js:93:46)
at srt2vtt (C:\Users\user\Desktop\subs\node_modules\srt2vtt\index.js:45:12)
at Object. (C:\Users\user\Desktop\subs\test.js:5:1)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)`

NOTE breaks subtitles in IE11/10

NOTE
Converted from .srt via srt2vtt: https://github.com/deestan/srt2vtt

Causes video.textTracks[0].cues to be empty on IE11; probably IE10 too.

Note that VTT files need also be served as Content-Type: text/vtt for subtitles to work on IE11.

UTF-8 encoding without BOM

When passing a UTF-8 encoded Buffer without a BOM it falls into the last conditional check // No BOM means CP1252 - convert but it seems to be working anyway.
Should I worry about it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.