mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 19:09:23 -05:00
Change path into string since we can play youtube videos too
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user