Skip to content

Commit 9fa9334

Browse files
authored
Merge pull request #134 from hyperaudio/132-cleanup-players
players cleanup #132
2 parents 3f4f56f + 10ea106 commit 9fa9334

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

js/hyperaudio-lite.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ function soundcloudPlayer(instance) {
5454
}
5555

5656
function videojsPlayer(instance) {
57-
const tag = document.createElement('script');
58-
5957
this.player = videojs.getPlayer(instance.player.id);
6058

6159
this.getTime = () => {
@@ -78,12 +76,10 @@ function videojsPlayer(instance) {
7876
}
7977

8078
function vimeoPlayer(instance) {
81-
const tag = document.createElement('script');
82-
8379
const iframe = document.querySelector('iframe');
84-
this.player = new Vimeo.Player(iframe);
85-
this.player.setCurrentTime(0)
86-
this.player.ready().then(instance.checkPlayHead);
80+
this.player = new Vimeo.Player(iframe);
81+
this.player.setCurrentTime(0)
82+
this.player.ready().then(instance.checkPlayHead);
8783

8884
this.getTime = () => {
8985
return new Promise((resolve) => {
@@ -104,7 +100,6 @@ function vimeoPlayer(instance) {
104100
}
105101
}
106102

107-
108103
function youtubePlayer(instance) {
109104
const tag = document.createElement('script');
110105
tag.id = 'iframe-demo';

0 commit comments

Comments
 (0)