X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=theme.cpp;fp=theme.cpp;h=4ddea3a25915713191719c0da8c412d49933ac02;hp=bc57b0d209cb329571c594ed904991c6ff57d150;hb=8ec5630a8e7ec089d2e39697d51642278d1977d7;hpb=cd48c8ab6d7425d4b4d9fdb2493da69b44848c9e diff --git a/theme.cpp b/theme.cpp index bc57b0d..4ddea3a 100644 --- a/theme.cpp +++ b/theme.cpp @@ -431,6 +431,14 @@ int HTMLInput_set_url(lua_State* L) return 0; } +int HTMLInput_reload(lua_State* L) +{ + assert(lua_gettop(L) == 1); + CEFCapture **video_input = (CEFCapture **)luaL_checkudata(L, 1, "HTMLInput"); + (*video_input)->reload(); + return 0; +} + int HTMLInput_get_signal_num(lua_State* L) { assert(lua_gettop(L) == 1); @@ -648,9 +656,10 @@ const luaL_Reg VideoInput_funcs[] = { }; const luaL_Reg HTMLInput_funcs[] = { - // TODO: reload, execute_javascript, perhaps set_max_fps? + // TODO: execute_javascript, perhaps set_max_fps? { "new", HTMLInput_new }, { "set_url", HTMLInput_set_url }, + { "reload", HTMLInput_reload }, { "get_signal_num", HTMLInput_get_signal_num }, { NULL, NULL } };