main.cpp 572 Bytes
Newer Older
daFischer's avatar
first  
daFischer committed
1 2 3 4 5

#include "main.h"

int main()
{
6
#ifdef EMSCRIPTEN
7 8
    //read the lecture's name from the Javascript variable x_filename
    
9
    char* memory = (char*) EM_ASM_INT({
10
        var x_memory = _malloc(x_filename.length+1);
daFischer's avatar
daFischer committed
11
        writeAsciiToMemory(x_filename, x_memory);
12 13 14
        return x_memory;
    },0);
    filename=memory;
15
    filename="/"+filename;
16
    free(memory);
17 18
#else
    //TODO: change this to fit your System
19
    chdir("/home/petter/teleteaching-webclient/emBuild/");
20 21
    
    filename=path+"/"+filename+"_a/"+filename;
22
#endif
23
    player=new Player(filename);
daFischer's avatar
first  
daFischer committed
24
}