#ifndef PHONONWEBPLAYER_H
#define PHONONWEBPLAYER_H

#include <QWidget>
#include <phonon>
#include <QUrl>
#include <QNetworkReply>
#include <QBuffer>
#include <QFile>

class PhononWebPlayer : public QWidget
{
    Q_OBJECT
public:
    explicit PhononWebPlayer(QNetworkReply *reply = 0, QString mode = "QNetworkReply");

    Phonon::VideoPlayer *mediaPlayer;
signals:

public slots:
    void downloading(qint64 cur,qint64 tot);
    void downloadFinished();
    void statusState(Phonon::State, Phonon::State);
    void play();
    void load();

private:
    QString mod;
    QNetworkReply* replyStream;
    bool loaded;
    bool buffering;
    QBuffer* mediaBuffer;
};

#endif // PHONONWEBPLAYER_H
