| | |
| | | self.addEvtListener('#pause-btn', 'click', function() { |
| | | self.kommando('pause'); |
| | | }); |
| | | self.addEvtListener('#weiter-btn', 'click', function() { |
| | | self.kommando('weiter'); |
| | | }); |
| | | self.addEvtListener('#weiter-btn', 'click', self.weiter); |
| | | |
| | | self.addEvtListener('#hier-btn', 'click', self.hier_spielen); |
| | | |
| | |
| | | var titel = self.titelErmitteln(document.querySelector(".selected")); |
| | | var playername = document.querySelector('#abspieler').value; |
| | | console.log('plname: ' + playername + ' url: ' + titel.katalogUrl + titel.pfad + titel.name); |
| | | self.http_post('../api/strg/' + playername + '/titel', JSON.stringify(titel), function(responseText) { |
| | | self.http_post('../api/strg/' + playername + '/play/titel', JSON.stringify(titel), function(responseText) { |
| | | self.meldung_mit_timeout(responseText, 1500); |
| | | }); |
| | | } else if(bereichName === 'Livestream-Auswahl') { |
| | | var streamName = document.querySelector(".selected").textContent; |
| | | var playername = document.querySelector('#abspieler').value; |
| | | var stream = new Livestream(streamName, '-'); |
| | | self.http_post('../api/strg/' + playername + '/stream', JSON.stringify(stream), function(responseText) { |
| | | self.http_post('../api/strg/' + playername + '/play/stream', JSON.stringify(stream), function(responseText) { |
| | | self.meldung_mit_timeout(responseText, 1500); |
| | | }); |
| | | } else { |
| | |
| | | } |
| | | }; |
| | | |
| | | this.weiter = function() { |
| | | var bereichName = document.querySelector('.bereich-name').textContent; |
| | | if(bereichName === '') { |
| | | var titel = self.titelErmitteln(document.querySelector(".selected")); |
| | | var playername = document.querySelector('#abspieler').value; |
| | | console.log('plname: ' + playername + ' url: ' + titel.katalogUrl + titel.pfad + titel.name); |
| | | self.http_post('../api/strg/' + playername + '/weiter/titel', JSON.stringify(titel), function(responseText) { |
| | | self.meldung_mit_timeout(responseText, 1500); |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | this.kommando = function(kommando) { |
| | | var abs = document.querySelector('#abspieler').value; |
| | | self.http_get('../api/strg/' + abs + '/' + kommando, function(responseText) { |