You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/simple-player/README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,17 @@ the linting is now done via the npm run lint command of the main project
84
84
85
85
## notes about problems I encountered during development
86
86
87
-
### using es6 modules with nodejs
87
+
### client problems
88
+
89
+
#### input type range not triggering change event
90
+
91
+
Because the value of the input type range element gets constantly updated by the player itself, when using an event listener on **change** will result in the event not firing at all (chrome only?) or it will fire but then at the moment when you read the value it will already have been updated by the player
92
+
93
+
this is why I recommend using the **input** event instead (which is what is used in this example), so far I had none of the problems I just mentioned using the "input" event instead of the "change" event
94
+
95
+
### server problems
96
+
97
+
#### using es6 modules with nodejs
88
98
89
99
Full nodejs support for es6 modules import/export syntax enabled
90
100
@@ -109,7 +119,7 @@ and in package.json you will notice that I also added:
109
119
}
110
120
```
111
121
112
-
### replacing cjs dirname with esm import.meta.url
122
+
####replacing cjs dirname with esm import.meta.url
113
123
114
124
When using es modules (esm), the __dirname environment variable is not available anymore, as it is for commonjs (cjs) only, however a replacement is available: meta.import.url
0 commit comments