Change path into string since we can play youtube videos too

This commit is contained in:
Ylva Selling
2023-02-15 17:59:27 -05:00
parent ce565a7002
commit 56473c77e0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ private:
void commandAsyncMpv(const char* cmd[],
LibmpvPropertyKey key = LibmpvPropertyKey::Command);
std::filesystem::path _videoFile;
std::string _videoFile;
// Video properties. Try to read all these values from the video
double _currentVideoTime = 0.0;
+2 -2
View File
@@ -44,7 +44,7 @@ namespace {
struct [[codegen::Dictionary(VideoPlayer)]] Parameters {
// [[codegen::verbatim(FileInfo.description)]]
std::filesystem::path file;
std::string file;
};
#include "videoplayer_codegen.cpp"
} // namespace
@@ -284,7 +284,7 @@ void VideoPlayer::initializeMpv() {
);
// Load file
std::string file = _videoFile.string();
std::string file = _videoFile;
const char* cmd[] = { "loadfile", file.c_str(), nullptr };
int result = mpv_command(_mpvHandle, cmd);
if (!checkMpvError(result)) {