X-Git-Url: https://git.sur5r.net/?p=minitube;a=blobdiff_plain;f=src%2Fyt%2Fytjs%2Fytjsvideo.h;fp=src%2Fyt%2Fytjs%2Fytjsvideo.h;h=a617f51c7d29a48f260e8e577c1d794828413282;hp=0000000000000000000000000000000000000000;hb=9337294c49c89c5cb01db726835da60af566821f;hpb=be5ee6ccd9b29c9d5ca59e4a3d4adf53bac6bc8d diff --git a/src/yt/ytjs/ytjsvideo.h b/src/yt/ytjs/ytjsvideo.h new file mode 100644 index 0000000..a617f51 --- /dev/null +++ b/src/yt/ytjs/ytjsvideo.h @@ -0,0 +1,22 @@ +#ifndef YTJSVIDEO_H +#define YTJSVIDEO_H + +#include +class YTJSVideo : public QObject { + Q_OBJECT +public: + explicit YTJSVideo(const QString &videoId, QObject *parent = nullptr); + void loadStreamUrl(); + int getDefinitionCode() const { return definitionCode; } + +signals: + void gotStreamUrl(const QString &videoUrl, const QString &audioUrl); + void errorStreamUrl(const QString &message); + +private: + QString videoId; + bool loadingStreamUrl = false; + int definitionCode; +}; + +#endif // YTJSVIDEO_H