Skip to content

Commit

Permalink
Eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed May 19, 2023
1 parent 927e9cf commit 5921253
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
40 changes: 20 additions & 20 deletions lib/VueYtframe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ function onPlayerReady(event) {
function onPlayerStateChange(event) {
switch (event.data) {
case window.YT.PlayerState.PLAYING:
emit("playing", event.target)
break
case window.YT.PlayerState.PAUSED:
emit("paused", event.target)
break
case window.YT.PlayerState.ENDED:
emit("ended", event.target)
break
case window.YT.PlayerState.PLAYING:
emit("playing", event.target)
break
case window.YT.PlayerState.PAUSED:
emit("paused", event.target)
break
case window.YT.PlayerState.ENDED:
emit("ended", event.target)
break
}
emit("stateChange", event.target)
}
Expand Down Expand Up @@ -610,19 +610,19 @@ function getVideoIdFromYoutubeURL(url) {
* Debounce function
*/
function debounce(func, wait, immediate) {
var timeout;
var timeout
return function () {
var context = this, args = arguments;
var context = this, args = arguments
var later = function () {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
};
timeout = null
if (!immediate) func.apply(context, args)
}
var callNow = immediate && !timeout
clearTimeout(timeout)
timeout = setTimeout(later, wait)
if (callNow) func.apply(context, args)
}
}
defineExpose({
player,
Expand Down
9 changes: 0 additions & 9 deletions src/views/PlaygroundPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,6 @@ const playerParameters = computed(() => {
return obj
})
const clearVideoIdInput = () => {
videoId.value = ""
document.getElementById("video-id").value = ""
}
const clearVideoUrlInput = () => {
videoUrl.value = ""
document.getElementById("video-url").value = ""
}
const yt = ref(null)
const destroyPlayer = () => {
if (yt.value) {
Expand Down

0 comments on commit 5921253

Please sign in to comment.