Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadTrack throws a TypeError on latest vtt.js #3820

Open
benjaoming opened this issue Dec 1, 2016 · 1 comment
Open

loadTrack throws a TypeError on latest vtt.js #3820

benjaoming opened this issue Dec 1, 2016 · 1 comment
Labels
pinned Things that stalebot shouldn't close automatically

Comments

@benjaoming
Copy link

benjaoming commented Dec 1, 2016

Description

This problem affects loading of VTT subtitles and is necessary to fix for future releases of vtt.js which have to be implemented for video-js VTT subtitles to work with Firefox 50 as detailed in #3819

Using the latest vtt.js master branch produces a type error after XHR calls.

Thanks to @bzbarsky for finding the solution, which is to add responseType: "arraybuffer" to default xhr2 options.

Making a PR for further discussion.

Steps to reproduce

We have details over in the below issue, otherwise I think the way to reproduce is to simply replace vtt.js 0.12.x with the latest master.

learningequality/ka-lite#5347

Error output

Example from our custom built:

TypeError: Argument 1 of TextDecoder.decode could not be converted to any of: ArrayBufferView, ArrayBuffer

	require<[756]</</WebVTT.Parser.prototype.parse http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:1961:24
	parseCues http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:11121:3
	loadTrack/< http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:11177:7
	ret http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:21958:12
	once/< http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:11681:12
	loadFunc http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:11555:9
	readystatechange http://127.0.0.1:8000/static/js/distributed/bundles/bundle_video.js:11485:13

Additional Information

versions

videojs

Any version that bumps vtt.js to latest master AFAIK.

browsers

Any

OSes

Any

@gkatsev
Copy link
Member

gkatsev commented Dec 19, 2016

We need update our copy of vttjs from upstream and this issue would need to be addressed at that point.

@gkatsev gkatsev added the pinned Things that stalebot shouldn't close automatically label Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Things that stalebot shouldn't close automatically
Projects
None yet
Development

No branches or pull requests

2 participants