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

Custom abr rules #1846

Merged

Conversation

jeremco
Copy link
Contributor

@jeremco jeremco commented Mar 30, 2017

Hello

The goal of this pull-request is to allow application to implements their own ABRRules, or add some to existing rules.
There are 5 commits in this PR

  • 1st is an export and a modification of FactoryMaker, so that external classes can create internal dashjs objects, such like SwitchRequest, using a factory. The idea is that FactoryMaker keeps an reference on objects factories. One object can then created externally.
    Example using SwitchRequest :
    //get switch request factory
    var SwitchRequest = dashjs.FactoryMaker.getClassFactoryByName('SwitchRequest');
    // create a switch request instance using factory :
    var mySwitchRequest = SwitchRequest(context).create();

  • 2nd commit adds methods to add custom rules to ABR collection. One custom rule is added to sample/dash-if-reference-player/app/rules/ directory. It has to be noticed, that the rule is using the FactoryMaker to be created by ABRCollection

  • 3rd, 4th and 5th commits add the possibility to enable/disable internal ABR rules, and add another custom rule.

It has to be noticed that the given custom rules are only samples and do nothing. It's up to the service to implement their rules

I have reintroduced the possibility to ad a priority on SwitchRequests in rules. It may be useful for some customs rules (cf sample)

Jérémie COLLET

@jeremco jeremco force-pushed the CustomABRRules branch 2 times, most recently from 01b2146 to 6802f97 Compare April 12, 2017 07:17
- Export Factory to dashjs, so that external object can have access to dash objects or singleton (to implements new abr alogithms)
- Keep a reference on object factories, to create object from their name, using factory
- implements a new ABR rule (does nothing), it is only given as an example on how to retrieve  and to create objects from dashjs factory
- Add a preference to activate  custom ABR rules, this can be set to replace default rules
- Add a new Throughput rule
- Fix an error on samples return
- Fix a pb on custom abandon rules  instantiation
- Add priority information for rules
@dsparacio dsparacio merged commit 832415c into Dash-Industry-Forum:development Jun 2, 2017
@jeremco jeremco deleted the CustomABRRules branch June 6, 2017 14:58
@nicosang nicosang mentioned this pull request Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants