<commit_before><!DOCTYPE html>
<html>
  <head>
    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
    <title></title>
    <script src="js/jquery.js"></script>
    <script src="js/display.js"></script>
    <script type="text/javascript" src="js/jquery-ui.js"></script>
    <script src="roslibjs/include/EventEmitter2/eventemitter2.js"></script>
    <script src="roslibjs/build/roslib.js"></script>
    <script src="ros2djs/include/EaselJS/easeljs.js"></script>
    <script src="ros2djs/build/ros2d.js"></script>
    <script src="ros3djs/include/threejs/three.js"></script>
    <script src="ros3djs/include/ColladaAnimationCompress/ColladaLoader2.js"></script>
    <script src="ros3djs/build/ros3d.min.js"></script>
    <script src="nav2djs/build/nav2d.js"></script>
    <script src="bootstrap/dist/js/bootstrap.js"></script>
  </head>
  <body style="background-image:url(img/strandsbg.png); width: 1024px; height: 768px; background-repeat:no-repeat;">
  
  <!-- Go back to the main page -->
  <a href="entertainment.html"><img style="position: absolute; left: 916px; top: 661px; width: 100px; height: 85px;"
        title="Auswahl" alt="Auswahl" src="img/button_liste_notext.png"></a>
  
   <div id="soundDiv" style="position: absolute; width:700px; left: 162px; top: 90px;">
  	<img id="imgElem" src="img/sheetmusic.png" />
  	<audio id="soundplayer" autoplay>
    	<source src="mp3/mozart_symphony17.mp3" type="audio/mpeg">
  	</audio>
  </div>
  
  <div id="prevDiv">
    <img style="position: absolute; left: 141px; top: 473px; width: 300px; height: 255px;"
        title="Musik" alt="Musik" src="img/button_zurueck.png" onclick="javascript:prev()">
  </div>
  <div id="nextDiv">
    <img style="position: absolute; left: 582px; top: 473px; width: 300px; height: 255px;"
        title="Musik" alt="Musik" src="img/button_vor.png" onclick="javascript:next()">
  </div>
  
  	<script>
        var hostname = location.hostname;

        var ros = new ROSLIB.Ros({
         // this is filled by the ros node when writing this page to the web server, but doesn't currently work
          // url : '<dynamic>bridge_server</dynamic>'
          url : 'ws://'+hostname+':9090'
        });
  		var soundPlayer = document.getElementById("soundplayer");
  		
  		function prev() {
  			// prev song
            var service_button = new ROSLIB.Service({ros : ros, name : '/aaf_music_player_service', serviceType : 'aaf_music_player/MusicPlayerService'});
            var request_button = new ROSLIB.ServiceRequest({player_action : 2});        
            service_button .callService(request_button, function(result) { console.log(result); });
            console.log('Called');
		} 
		function next() {
			// next song
            var service_button = new ROSLIB.Service({ros : ros, name : '/aaf_music_player_service', serviceType : 'aaf_music_player/MusicPlayerService'});
            var request_button = new ROSLIB.ServiceRequest({player_action : 3});        
            service_button .callService(request_button, function(result) { console.log(result); });
            console.log('Called');
		}
	</script> 
  </body>
</html><commit_msg>Added play/pause button for song interface. Had to move 'back to main' button though, should find some consistent place for that button.<commit_after><!DOCTYPE html>
<html>
  <head>
	<meta content="text/html; charset=windows-1252" http-equiv="content-type">
	<title></title>
	<script src="js/jquery.js"></script>
	<script src="js/display.js"></script>
	<script type="text/javascript" src="js/jquery-ui.js"></script>
	<script src="roslibjs/include/EventEmitter2/eventemitter2.js"></script>
	<script src="roslibjs/build/roslib.js"></script>
	<script src="ros2djs/include/EaselJS/easeljs.js"></script>
	<script src="ros2djs/build/ros2d.js"></script>
	<script src="ros3djs/include/threejs/three.js"></script>
	<script src="ros3djs/include/ColladaAnimationCompress/ColladaLoader2.js"></script>
	<script src="ros3djs/build/ros3d.min.js"></script>
	<script src="nav2djs/build/nav2d.js"></script>
	<script src="bootstrap/dist/js/bootstrap.js"></script>
	</head>
	<body style="background-image:url(img/strandsbg.png); width: 1024px; height: 768px; background-repeat:no-repeat;">

	<!-- Go back to the main page -->
	<a href="entertainment.html"><img style="position: absolute; left: 916px; top: 12px; width: 100px; height: 85px;"
		title="Auswahl" alt="Auswahl" src="img/button_liste_notext.png"></a>

	<div id="soundDiv" style="position: absolute; width:700px; left: 162px; top: 90px;">
		<img id="imgElem" src="img/sheetmusic.png" />
	</div>

	<div id="prevDiv">
		<img style="position: absolute; left: 70px; top: 473px; width: 300px; height: 255px;"
			title="Musik" alt="Musik" src="img/button_zurueck.png" onclick="javascript:prev()">
	</div>

	<div id="playDiv">
		<img style="position: absolute; left: 380px; top: 473px; width: 300px; height: 255px;"
			title="Musik" alt="Musik" src="img/button_stopp.png" onclick="javascript:playPause()">
	</div>
	<div id="pauseDiv">
		<img style="position: absolute; left: 380px; top: 473px; width: 300px; height: 255px;"
			title="Musik" alt="Musik" src="img/button_start.png" onclick="javascript:playPause()">
	</div>

	<div id="nextDiv">
		<img style="position: absolute; left: 690px; top: 473px; width: 300px; height: 255px;"
			title="Musik" alt="Musik" src="img/button_vor.png" onclick="javascript:next()">
	</div>
  
	<script>
		var hostname = location.hostname;

		var ros = new ROSLIB.Ros({
		 // this is filled by the ros node when writing this page to the web server, but doesn't currently work
		  // url : '<dynamic>bridge_server</dynamic>'
		  url : 'ws://'+hostname+':9090'
		});
	
		var playDiv = document.getElementById("playDiv"); 
		var pauseDiv = document.getElementById("pauseDiv");
		var playing = false;

		function prev() {
			var result = aafMusicPlayerService(2);

			playing = true;
			console.log('prev() called');
		} 

		function next() {
			var result = aafMusicPlayerService(3);

			playing = true;
			console.log('next() called');
		}

		function playPause() { 
			if (playing == true) {
				var result = aafMusicPlayerService(1);
	
				playDiv.style.display = 'block';
				pauseDiv.style.display = 'none';
			} else {
				var result = aafMusicPlayerService(0);
	
				playDiv.style.display = 'none';
				pauseDiv.style.display = 'block';
			}
		}

		function aafMusicPlayerService(actionId) {
			var service_result;

			var service_button = new ROSLIB.Service({ros : ros, name : '/aaf_music_player_service', serviceType : 'aaf_music_player/MusicPlayerService'});
			var request_button = new ROSLIB.ServiceRequest({player_action : actionId});        
			service_button.callService(request_button, function(result) { service_result = result; console.log(result); });
			
			return service_result;
		}
	</script> 
  </body>
</html>
{'fraction_non_alphanumeric': 0.1657917760279965, 'fraction_numerical': 0.025080198308544764, 'mean_word_length': 4.153268219383921, 'pattern_counts': {'":': 0, '<': 114, '<?xml version=': 0, '>': 114, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3459612', 'n_tokens_mistral': 2571, 'n_tokens_neox': 2296, 'n_words': 476}