Fault tolerance for bad text encoding
See original GitHub issueHave you read the FAQ and checked for duplicate open issues? Possible duplicate of https://github.com/google/shaka-player/issues/571, but in the last comment; it is written if the vtt is valid but still you face the issue then raise an issue ticket.
What version of Shaka Player are you using? https://shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;uilang=en-US;panel=HOME;build=uncompiled
Can you reproduce the issue with our latest release version? I checked in demo.
Can you reproduce the issue with the latest code from master
?
NA
Are you using the demo app or your own custom app? demo app
If custom app, can you reproduce the issue using our demo app? NA
What browser and OS are you using? Firefox, MacOS Catalina 10.15.5
For embedded devices (smart TVs, etc.), what model and firmware version are you using? NA
What are the manifest and license server URIs? Sending you over email.
What did you do? Simply Play the content. It throws, Shaka Error TEXT.BAD_ENCODING () While debugging further, can see that it fails in vtt_text_parser.js We saw that this vtt file is valid using , https://quuz.org/webvtt/
What did you expect to happen? Subtitles should be visible on the player.
What actually happened? Subtitles are not visible on the Player. It throws https://shaka-player-demo.appspot.com/docs/api/shaka.util.Error.html#value:2004
Object { severity: 2, category: 2, code: 2004, data: [], handled: false, message: "Shaka Error TEXT.BAD_ENCODING ()", stack: "@https://shaka-player-demo.appspot.com/lib/util/error.js:97:17\nfromUTF8@https://shaka-player-demo.appspot.com/lib/util/string_utils.js:54:13\nparseMedia@https://shaka-player-demo.appspot.com/lib/text/vtt_text_parser.js:39:38\nappendBuffer@https://shaka-player-demo.appspot.com/lib/text/text_engine.js:167:34\nasync*appendBuffer@https://shaka-player-demo.appspot.com/lib/media/media_source_engine.js:477:30\nappend_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1485:51\nasync*fetchAndAppend_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1207:18\nasync*update_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1029:20\nonUpdate_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:870:26\nasync*scheduleUpdate_/mediaState.updateTimer<@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1720:20\nonTick@https://shaka-player-demo.appspot.com/lib/util/delayed_tick.js:56:14\nsetTimeout handler*tickAfter@https://shaka-player-demo.appspot.com/lib/util/delayed_tick.js:60:24\nscheduleUpdate_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1726:8\ninitStreams_@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:746:14\nasync*start@https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:182:16\nonLoad_@https://shaka-player-demo.appspot.com/lib/player.js:1846:33\nasync*@https://shaka-player-demo.appspot.com/lib/player.js:553:51\nenterNode@https://shaka-player-demo.appspot.com/lib/player.js:575:16\ntakeNextStep_@https://shaka-player-demo.appspot.com/lib/routing/walker.js:341:48\ndoOneThing_@https://shaka-player-demo.appspot.com/lib/routing/walker.js:228:19\nmainLoop_@https://shaka-player-demo.appspot.com/lib/routing/walker.js:209:18\nasync*this.mainLoopPromise_<@https://shaka-player-demo.appspot.com/lib/routing/walker.js:105:63\npromise callback*@https://shaka-player-demo.appspot.com/lib/routing/walker.js:105:47\n@https://shaka-player-demo.appspot.com/lib/player.js:608:20\nsetupUIandAutoLoad_@https://shaka-player-demo.appspot.com/ui/ui.js:343:20\nscanPageForShakaElements_@https://shaka-player-demo.appspot.com/ui/ui.js:296:34\nEventListener.handleEvent*@https://shaka-player-demo.appspot.com/ui/ui.js:430:10\n" }
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
@theodab has corrected me privately that we can have extra fault tolerance without a meaningful increase in binary size. Now we’re debating the best solution.
I don’t believe we should write a custom UTF-8 parser. Using browser built-ins where possible and avoiding third-party dependencies is how Shaka Player remains smaller than dash.js, in spite of supporting DASH+HLS+offline+cast.
So I’m removing “enhancement” and closing the issue. Thanks!