Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shikwasa",
"version": "2.2.1",
"name": "@anson0370/shikwasa",
"version": "2.2.3",
"description": "A web audio player born for podcasts. With chapters, playback speed and forward/backward controls, it is best paired with your podcasting website.",
"files": [
"dist"
Expand Down Expand Up @@ -50,7 +50,9 @@
"chapter"
],
"license": "MIT",
"repository": "github:jessuni/shikwasa",
"repository": {
"url": "git+ssh://git@github.com/anson0370/shikwasa.git"
},
"browserslist": [
">0.2%",
"not ie <= 8"
Expand Down
3 changes: 2 additions & 1 deletion src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class Player {
})
})
this.audio.preload = this.options.preload
this.audio.playbackRate = this.options.initSpeed
this.muted = this.options.muted
this.update(this.options.audio)
}
Expand Down Expand Up @@ -329,7 +330,7 @@ class Player {

seek(time) {
if (!this.seekable) return
time = parseInt(time)
time = parseFloat(time)
if (isNaN(time)) {
console.error('Shikwasa: seeking time is NaN')
}
Expand Down
3 changes: 3 additions & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export function handleOptions(options) {
if (_options.speedOptions.length > 1) {
_options.speedOptions.sort((a, b) => a - b)
}
if (!_options.initSpeed || _options.speedOptions.indexOf(_options.initSpeed) === -1) {
_options.initSpeed = 1
}
return _options
}

Expand Down