Optional offset param to IVideoSource.selectVideoTrack for partial buffer clear#144
Conversation
lib/media/i_stream.js
Outdated
7a00a18 to
5433bbd
Compare
|
Hi @tdrews, I've updated the branch with the suggested changes (have squashed the commits, not sure if you prefer that or not?), with the exception of removing the @expose annotations. Reason being is that without it, the compiler is renaming both the selectVideoTrack function and the videoSource variable (which is now just a protected member), which breaks an external custom ABR manager. Is there a better way to stop the compiler from renaming? |
|
Ah, yes, you are right about Does your custom ABR manager only need to access |
5433bbd to
2c35aae
Compare
|
Yes the only reason to expose videoSource was to call videoSource.selectVideoTrack with different parameters. No worries about the change, I've updated the PR so that videoSource remains private and SimpleAbrManager.selectVideoTrack has the exta parameter for the offset. |
|
Testing in progress... |
|
CI error: Failed to parse log file! |
|
:( Our bot is having a bad day. Code looks good, but there are some linter errors. Can you check with build/lint.sh ? |
|
The linter is returning some additional errors compared to the latest master branch (all "Missing space before.." or "Wrong indentation: expected any of.." errors) - should there be zero errors? I wasn't sure if this was a requirement as master also has these (about 200 errors). Unless me running this on Windows via Cygwin is giving different results? Here is a gist of the the linter log for this branch: https://gist.github.com/jonoward/a49b613c9ac5c988779c |
|
Hmm, that's strange. There should be 0 linter errors on master. Perhaps this is an issue with running the linter on Cygwin as you suggested; I'll add an issue to track this. The only linter errors I see are indentation ones, |
|
Yeah this is a weird one, if I clone a fresh copy of master, with no modifications, and run the linter I get a bunch of errors, nearly all of them are the [Missing space before "("] error, e.g. lines like this: Is it possible that the lint rulesets are slightly different on Cygwin? Because for me it seems that nearly all the usages of Promise.catch are failing this test, when I'm not sure if they should (seems it should only apply for actual catch blocks). I'll try to tweak this PR branch so that it at least fails the linter in the same way that master does. I could run the automated fixjsstyle command, but I'm not sure if you actual intended for these Promise.catch calls to have the extra spaces. I'll try rustle up a linux VM to see if I get different results there. Thanks for the help.. |
…ows a partial clearing of the buffer to occur
2c35aae to
d5d43c6
Compare
|
Right, have pushed some new formatting changes such that the linter is reporting no errors when run on Linux - could you try run the bot again? Thanks |
Mainly for use in a custom ABR manager, where calling StreamVideoSource.selectVideoTrack could pass an optional offset param, which is the number of seconds in front of video.currentTime that the buffer should be cleared from.
Useful when configuring the player with a large buffer that should be truncated when upgrading from a lower bitrate to a higher one (so that the user sees the newer bitrate without having to player through the size of the buffer)
Addresses issue #95