if( !p_input )
return luaL_error( L, "can't add subtitle: no current input" );
if( !lua_isstring( L, 1 ) )
- return luaL_error( L, "vlc.input.add_subtitle() usage: (url)" );
- const char *psz_url = luaL_checkstring( L, 1 );
- input_AddSubtitle( p_input, psz_url, false );
+ return luaL_error( L, "vlc.input.add_subtitle() usage: (path)" );
+ const char *psz_path = luaL_checkstring( L, 1 );
+ input_AddSubtitle( p_input, psz_path, false );
vlc_object_release( p_input );
return 1;
}
Input
-----
input.is_playing(): Return true if input exists.
-input.add_subtitle(url): Add a subtitle to the current input
+input.add_subtitle(url): Add a subtitle file (by path) to the current input
input.item(): Get the current input item. Input item methods are:
:uri(): Get item's URI.
:name(): Get item's name.
--]]
vlc.playlist.add({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
elseif command == "addsubtitle" then
- vlc.input.add_subtitle (vlc.strings.make_uri(val))
+ vlc.input.add_subtitle (val)
elseif command == "in_enqueue" then
vlc.playlist.enqueue({{path=vlc.strings.make_uri(input),options=options,name=name,duration=duration}})
elseif command == "pl_play" then