Skip to content

Commit

Permalink
fix: programmatically create Config getters/setters
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev committed Dec 16, 2020
1 parent 904153f commit 8454da5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/videojs-http-streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,7 @@ const Vhs = {
};

// Define getter/setters for config properties
[
'GOAL_BUFFER_LENGTH',
'MAX_GOAL_BUFFER_LENGTH',
'BACK_BUFFER_LENGTH',
'GOAL_BUFFER_LENGTH_RATE',
'BUFFER_LOW_WATER_LINE',
'MAX_BUFFER_LOW_WATER_LINE',
'EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE',
'BUFFER_LOW_WATER_LINE_RATE',
'BANDWIDTH_VARIANCE'
].forEach((prop) => {
Object.keys(Config).forEach((prop) => {
Object.defineProperty(Vhs, prop, {
get() {
videojs.log.warn(`using Vhs.${prop} is UNSAFE be sure you know what you are doing`);
Expand Down

0 comments on commit 8454da5

Please sign in to comment.