#include "playerjs.h"

PlayerJS::PlayerJS(PhononWebPlayer *player, QObject *parent) :
    QObject(parent),
    webPlayer(0)

{
    if(player == NULL)
        return;

    webPlayer = player;
}

int PlayerJS::Width(){
    return webPlayer->width();
}

int PlayerJS::Height(){
    return webPlayer->height();
}

void PlayerJS::pause(){
    webPlayer->mediaPlayer->pause();
}

void PlayerJS::resume(){
    webPlayer->mediaPlayer->play();
}

float PlayerJS::getVolume(){
    return webPlayer->mediaPlayer->volume();
}

void PlayerJS::setVolume(float val){
    webPlayer->mediaPlayer->setVolume(val);
}

void PlayerJS::replay(){
    webPlayer->play();
}

void PlayerJS::showFullscreen(){
    webPlayer->mediaPlayer->showFullScreen();
}

void PlayerJS::showNormal(){
    webPlayer->mediaPlayer->showNormal();
}
