2
0
Эх сурвалжийг харах

Title now changes after song name and artist

:trollface: And some speak stuff
johand199 9 жил өмнө
parent
commit
e2ec8acfcb

+ 3 - 0
app/client/scripts/onCreated.js

@@ -188,6 +188,9 @@ Template.room.onCreated(function () {
         var d = moment.duration(parseInt(songData.duration), 'seconds');
         $("#time-total").text(d.minutes() + ":" + ("0" + d.seconds()).slice(-2));
         Session.set("timeFormat", d.minutes() + ":" + ("0" + d.seconds()).slice(-2));
+        document.title = Session.get("title") + " - " + Session.get("artist") + " - Musare"
+        var msg = new SpeechSynthesisUtterance("New song:" + Session.get("title") + " By: " + Session.get("artist"));
+        window.speechSynthesis.speak(msg);
     }
 
     function resizeSeekerbar() {