Copy-pasting sample codes throws error "this.videoPlayerRef is undefined"
Expected Behavior
Sample codes are expected to run without errors
Solution
In sample codes, replacing methods with arrow functions makes "this" accessible and solves error.
From
trimVideo(){...this.videoPlayerRef...}
To
trimVideo=()=>{...this.videoPlayerRef...}
It easy to notice but novice developers could be in a hard time.
Current Behavior
Copy-pasting sample codes throws error "this.videoPlayerRef is undefined"
Expected Behavior
Sample codes are expected to run without errors
Solution
In sample codes, replacing methods with arrow functions makes "this" accessible and solves error. From
trimVideo(){...this.videoPlayerRef...}
TotrimVideo=()=>{...this.videoPlayerRef...}
It easy to notice but novice developers could be in a hard time.
Thanks for the great library by the way.