Skip to content

Commit

Permalink
chore: remove unnecessary props
Browse files Browse the repository at this point in the history
  • Loading branch information
Copay committed Aug 8, 2019
1 parent 741d1ba commit 86bd53d
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion declaration/caraoke.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Option, LyricItem } from "./caraoke.interface.js";
export default class Caraoke {
private audioNode;
private container;
private lyric;
private view;
Expand Down
1 change: 0 additions & 1 deletion declaration/caraoke.interface.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export interface Option {
audio: HTMLMediaElement;
container: HTMLElement;
lyric?: LyricItem[];
}
Expand Down
1 change: 0 additions & 1 deletion dist/caraoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import CaraokeView from "./view.js";
export default class Caraoke {
constructor(defaultOptions) {
defaultOptions.lyric && (this.lyric = defaultOptions.lyric);
this.audioNode = defaultOptions.audio;
this.container = defaultOptions.container;
CaraokeView.install();
this.view = new CaraokeView;
Expand Down
1 change: 0 additions & 1 deletion src/caraoke.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export interface Option {
audio: HTMLMediaElement;
container: HTMLElement;
lyric?: LyricItem[];
}
Expand Down
2 changes: 0 additions & 2 deletions src/caraoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import CaraokeView from "./view.js";
* An alternative karaoke presentation module.
*/
export default class Caraoke {
private audioNode: HTMLMediaElement;
private container: HTMLElement;
private lyric: LyricItem[];
private view: CaraokeView;
Expand All @@ -20,7 +19,6 @@ export default class Caraoke {
}
constructor(defaultOptions: Option) {
defaultOptions.lyric && (this.lyric = defaultOptions.lyric);
this.audioNode = defaultOptions.audio;
this.container = defaultOptions.container;
CaraokeView.install()
this.view = new CaraokeView;
Expand Down
2 changes: 1 addition & 1 deletion test/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<audio src="https://localhost/example.music" id="mediaPlayer" controls></audio>
<script type="module">
import Caraoke from "/dist/caraoke.js";
const c = new Caraoke({audio:mediaPlayer,container:document.body});
const c = new Caraoke({container:document.body});
c.setLyric(JSON.parse(`MusicLyric.as.LyricItem[]`));
mediaPlayer.addEventListener("timeupdate",()=>c.render(mediaPlayer.currentTime))
</script>
Expand Down

0 comments on commit 86bd53d

Please sign in to comment.