Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Es funktioniert nicht.Verhalten vom Programm...?
KEINE Fehlerbeschreibung ist !!Ich habs schon einmal probiert, aber es funktioniert nicht![]()
try {
Witz witz = getWitz();
std::cout << witz << std::endl;
}
catch (WitzErr error) {
// sollte nicht passieren
std::cout << error.what() << std::endl;
}
---
Ausgabe: Es ist nicht 1. April!
import java.io.*;
import javazoom.jl.player.*;
public class AudioPlayer extends Thread {
//Path to the MP3-File
private String fileLocation;
//true -> Audio File will be repeated
private boolean loop;
//The Player itself -> provided by the libary JLayer
private Player player;
private boolean pause = false;
//Constructor to initalize the member values
public AudioPlayer(String fileLocation, boolean loop) {
this.fileLocation = fileLocation;
this.loop = loop;
}
//The class is extending a Thread so it needs a run Method -> this Method will be started with the .start() command
public void run() {
try {
do {
FileInputStream buff = new FileInputStream(fileLocation);
player = new Player(buff);
player.play();
} while (loop);
} catch (Exception e) {
e.printStackTrace();
} finally {
close();
}
}
//Close the Player
public void close(){
loop = false;
player.close();
this.interrupt();
}
}
public class Main {
public static void main(String[] args) {
AudioPlayer ap = new AudioPlayer("mpthreetest.mp3", false);
ap.start();
}
}