Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.06k stars 1.67k forks source link

why not use websocket #2731

Closed zhangtianxiao closed 5 years ago

zhangtianxiao commented 5 years ago

I don't want to load media by HTTP. Dash.js has not support. xhr => websocket, What shall I do? Thanks.

epiclabsDASH commented 5 years ago

Hi @zhangtianxiao. Currently dash.js supports two different mechanisms for requesting segments:

You will find the implementation of both below src/streaming/net folder. In case you would like to add a new one I recommend you to take a look at it.

Alternatively, you could also use "extend" capability of dash.js to override XHRLoader so it uses your own transport implementation. I wouldn't recommend you to go for this approach before trying the previous one (add your own networking implementation directly in src/streaming/net).