code:
var context = {};
var tempout = xmlhttp.response;
// get the class factory - note that this method requires a string as the parameter
var DashParserFactory = dashjs.FactoryMaker.getClassFactory('DashParser');
// create a new instance of mpdparser
var mpdParser = DashParserFactory(context).create();
//parser mpd file
console.log(mpdParser.parse(tempout));
```
SCRIPT438: Object doesn't support property or method 'parse'
As discussed in your other issue (#2348), if you want to get the factory using the class name as a string you need to use dashjs.FactoryMaker.getClassFactoryByName.
Once that is fixed, the parse method can be accessed, but you'll get an Error thrown because you need to provide some configuration to DashParser in the create method. See https://github.com/Dash-Industry-Forum/dash.js/blob/development/src/dash/parser/DashParser.js#L42.
Are there some examples of configuration?
@fujunustc, could you please share more information about the use case you are trying to implement? Why do you need to instantiate DashParser in your own code?
Tile-player with adaptive bitrate control in virtual reality video(4k or more higher resolution).
I see, Thanks.
Because I dont familiar with dashjs. Consequencely, I want to acquire more information of dashjs.However, there is not much guidebook.
I don't think you need to instantiate DashParser yourself to achieve that. In fact, I don't see any reason in which parsing the mpd out of dash.js media player will help you to implement a tile based player.
@fujunustc, did you take a look to the user guide?
In http://cdn.dashjs.org/latest/jsdoc/index.html#toc7__anchor you will find documentation about how to instantiate dash.js in your own web app. Apart from this, you can take a look to dash.js samples. More specifically I recommend you to take a look to basic samples, that will help you to know more about how to instantiate and use dash.js player. You can find them here: https://github.com/Dash-Industry-Forum/dash.js/tree/development/samples/getting-started-basic-embed
Please, let me know if this helps. Thanks
I have read the user guide and some samples. i understand the basic usage of dashjs. Maybe, i need some time to get the hang of it. Thanks a lot!
Is there some approaches to achieve tile aggregation in dashjs?
There are some support for "tiled videos" (see #2045 and the way the mpd is built using different Adaptations and ViewPoints to define video tiles), although that, by itself, is not enough if you want to build a VR application. Using that your app would need to instantiate several players, each one playing a different tile, do the stitching and keep playback synchronized across all of them.
I see,thanks!
Closing this issue as. Thanks
Most helpful comment
As discussed in your other issue (#2348), if you want to get the factory using the class name as a string you need to use
dashjs.FactoryMaker.getClassFactoryByName.Once that is fixed, the
parsemethod can be accessed, but you'll get anErrorthrown because you need to provide some configuration to DashParser in thecreatemethod. See https://github.com/Dash-Industry-Forum/dash.js/blob/development/src/dash/parser/DashParser.js#L42.