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

readable dash.all.min.js #10

Closed
arjunvb opened this issue Oct 31, 2017 · 9 comments
Closed

readable dash.all.min.js #10

arjunvb opened this issue Oct 31, 2017 · 9 comments

Comments

@arjunvb
Copy link

arjunvb commented Oct 31, 2017

Hi,

I was wondering if you could share a readable version of //pensieve/video_server/dash.all.min.js so I could make some modifications to the Pensieve player.

Thanks!

@ravinet
Copy link
Collaborator

ravinet commented Oct 31, 2017

After you install the grunt dependencies (https://github.com/hongzimao/pensieve/blob/master/dash_client/README.md), you can edit the dash.js source code. For example, we updated the ABR algorithm used by the dash player by modifying this file: https://github.com/hongzimao/pensieve/blob/master/dash.js/src/streaming/controllers/AbrController.js.

After you make your edits to the source code, you will have to recompile the code to generate a new dash.all.min.js file. To do this, run ./compile.sh in the pensieve/dash.js directory.

@arjunvb
Copy link
Author

arjunvb commented Oct 31, 2017

Thanks! I will try this out.

@arjunvb
Copy link
Author

arjunvb commented Nov 5, 2017

I installed the grunt dependencies as documented in the README, and but when I run ./compile.sh in //pensieve/dash.js, I get the warning "Cannot find module 'browserify-derequire'", and the rest of the pipeline fails.

I tried installing grunt-browserify and browserify-derequire through npm, but I'm getting the same error. It seems like the browserify-derequire package has out-of-date dependencies (https://github.com/rse/browserify-derequire).

I'd appreciate it if you could give me some pointers to resolve this issue. Thanks!

@hongzimao
Copy link
Owner

hongzimao commented Nov 6, 2017

We didn't hit this package installation problem before. Did you use python setup.py?

@arjunvb
Copy link
Author

arjunvb commented Nov 6, 2017

Yes, I ran setup.py in the //pensieve root directory. It doesn't seem to install any grunt packages, but I did install all dependencies in the dash.js source code README (https://github.com/hongzimao/pensieve/blob/master/dash_client/README.md), linked above.

@vibhaa
Copy link

vibhaa commented Nov 6, 2017

I ran into a similar set of issues. I tried a few different installations in the sense that I installed many packages individually as I saw errors. I installed grunt separately, grunt-cli separately, jsdoc separately (it seems like the jsdoc-plugin is no longer the right package for higher versions of grunt), the jasmine-istanbul package, etc. I'm not entirely sure what solved it because I struggled to replicate this myself a second time, but I eventually got it to compile. Also, if it helps, the compiled dash.all.min.js will be found in dash.js/build/temp/. Sorry for not being more specific.

@hongzimao
Copy link
Owner

Thanks a lot Vibhaa. Hope this helps @arjunvb!

@arjunvb
Copy link
Author

arjunvb commented Nov 6, 2017

Thanks @vibhaa, @hongzimao. I also had to manually install grunt, grunt-cli, jasmine-istanbul, and several other packages. And I had to modify settings in .jshintc and .jscsrc so the existing source code met passed lint and code style checks.

I've been stuck at the browserify stage (https://github.com/hongzimao/pensieve/blob/master/dash.js/Gruntfile.js#L244). It's saying the 'browserify-derequire' module is not found even though I've installed with npm. I'm seeing a similar issue for the 'babelify' package as well. Did you ever have an issue with either of these two packages?

Thanks for your help.

@arjunvb
Copy link
Author

arjunvb commented Nov 7, 2017

@hongzimao, I got it to compile successfully! I'm not too sure what the problem was, but, to resolve the 'browserify-derequire' module issue, I went back and re-installed the dependencies listed in the README. It's possible something failed earlier that I didn't catch, but installing 'browserify-derequire' didn't help. To get the rest of it to work, I had to do several other package installs, as @vibhaa noted above.

Here's a summary of the issues I ran into when compiling dash.js from source:

  • Lint and code style checks failed due to warnings (e.g. variable defined but not used). I modified settings in .jshintc and .jscsrc to suppress these warnings so they didn't interfere with the rest of the compilation.
  • For any module that's not found, I ran npm install <module name> and re-started the compile script.
  • The uglify task failed several times due to memory issues. To fix this, I increased the allocated memory, by updating line 2 in compile.sh as follows: grunt --config Gruntfile.js --force --max-old-space-size=16384

Thanks!

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

No branches or pull requests

4 participants