Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2: simply added error message to the player view #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions styles/player.mcss
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Player {
background: #372222;
color: #F58F8F;

:after {
content: ": code error :("
:before {
content: "code error :( "
color: white
font-weight: normal
}
Expand Down Expand Up @@ -158,4 +158,4 @@ Player {
fill: #BAA
}
}
}
}
2 changes: 2 additions & 0 deletions views/lesson.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ function LessonView (state, lesson) {

function verify () {
player.classList.remove('-error')
player.firstChild.innerHTML = 'Your Audio' // reset audio/error message

verifier.verify(function (err, pass) {
player.classList.remove('-playing')
Expand All @@ -153,6 +154,7 @@ function LessonView (state, lesson) {
if (err) {
player.classList.add('-error')
if (err instanceof Error) {
player.firstChild.innerHTML = err.message;
console.log(err.message + '\n' + err.stack)
} else {
console.log(err)
Expand Down