|
@@ -6,10 +6,16 @@
|
|
|
|
|
|
package de.nplusc.izc.izstreamer;
|
|
|
|
|
|
+import com.sun.jna.Memory;
|
|
|
+import java.awt.Canvas;
|
|
|
import java.awt.Desktop;
|
|
|
import java.io.IOException;
|
|
|
import java.net.URI;
|
|
|
import java.net.URISyntaxException;
|
|
|
+import javafx.application.Application;
|
|
|
+import javax.swing.JPanel;
|
|
|
+import uk.co.caprica.vlcj.player.direct.BufferFormat;
|
|
|
+import uk.co.caprica.vlcj.player.direct.DirectMediaPlayer;
|
|
|
|
|
|
/**
|
|
|
*
|
|
@@ -21,12 +27,13 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
/**
|
|
|
* Creates new form Player
|
|
|
*/
|
|
|
- public Player()
|
|
|
+ public Player(StreamGUI g)
|
|
|
{
|
|
|
+ playmanager=g;
|
|
|
initComponents();
|
|
|
}
|
|
|
//public static final String StreamTitle = "";
|
|
|
- private static final StreamGUI playmanager = new StreamGUI();
|
|
|
+ private StreamGUI playmanager;
|
|
|
/**
|
|
|
* This method is called from within the constructor to
|
|
|
* initialize the form.
|
|
@@ -152,7 +159,7 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
btnPlay.setText("STOP");
|
|
|
lblSender.setText("Connecting....");
|
|
|
new Thread(()->
|
|
|
- playmanager.play("http://31.7.177.108:2294",this)).start();
|
|
|
+ playmanager.play()).start();
|
|
|
//http://31.7.177.108:2299/played.html
|
|
|
isPlaying=true;
|
|
|
}
|
|
@@ -172,7 +179,7 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
{//GEN-HEADEREND:event_btnLastPlayedActionPerformed
|
|
|
try
|
|
|
{
|
|
|
- Desktop.getDesktop().browse(new URI("http://31.7.177.108:2299/played.html"));
|
|
|
+ Desktop.getDesktop().browse(new URI("http://31.7.177.108:2294/played.html"));
|
|
|
}
|
|
|
catch (URISyntaxException ex)
|
|
|
{
|
|
@@ -188,6 +195,14 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
{
|
|
|
lblTIT.setText("Now playing: "+tit);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Canvas getBackGround()
|
|
|
+ {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @param args the command line arguments
|
|
@@ -236,10 +251,28 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
{
|
|
|
public void run()
|
|
|
{
|
|
|
- new Player().setVisible(true);
|
|
|
+ VisualizedGUI vgui = new VisualizedGUI();
|
|
|
+ vgui.setSize(iZstreamer.width, iZstreamer.height);
|
|
|
+ vgui.validate();
|
|
|
+ vgui.setVisible(true);
|
|
|
+ new Thread(()->{
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Thread.sleep(500);
|
|
|
+ StreamGUI.player.play();
|
|
|
+ }
|
|
|
+ catch (InterruptedException ex)
|
|
|
+ {
|
|
|
+ ex.printStackTrace();
|
|
|
+
|
|
|
+ }}).start();
|
|
|
+ //StreamGUI.player.setPlayerStructure(vgui);
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
private javax.swing.JButton Info;
|
|
@@ -249,4 +282,5 @@ public class Player extends javax.swing.JFrame implements PlayerStructure
|
|
|
private javax.swing.JLabel lblTIT;
|
|
|
private javax.swing.JSlider sliderVolume;
|
|
|
// End of variables declaration//GEN-END:variables
|
|
|
+
|
|
|
}
|