/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package de.nplusc.izc.izstreamer;

import uk.co.caprica.vlcj.player.MediaPlayer;
import uk.co.caprica.vlcj.player.MediaPlayerFactory;

/**
 *
 * @author LH
 */
public class StreamGUI
{

    boolean stopPlay = false;
    public MediaPlayer m;
    private boolean fs=true;
    public void play(String url, PlayerStructure thix)
    {
        //if(m==null)
        if(fs)
        {
            m = new MediaPlayerFactory().newHeadlessMediaPlayer();
            m.startMedia(url);
            fs=true;
        }
        else
        {
            m.play();
        }
        while(!stopPlay)
        {
        thix.setPlaying(m.getMediaMeta().getTitle());
        }
        m.pause();
        stopPlay=false;//ARSCHFOTZE!
        
    }
    
}
