Commit da830ed4 authored by Sergey Radionov's avatar Sergey Radionov

npapi: added playback mode processing

parent 624215ef
......@@ -435,6 +435,8 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
ppsz_argv[ppsz_argc++] = "--no-video-title-show";
ppsz_argv[ppsz_argc++] = "--no-xlib";
bool b_autoloop = false;
/* parse plugin arguments */
for( int i = 0; (i < argc) && (ppsz_argc < 32); i++ )
{
......@@ -471,14 +473,7 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
else if( !strcmp( argn[i], "loop")
|| !strcmp( argn[i], "autoloop") )
{
if( boolValue(argv[i]) )
{
ppsz_argv[ppsz_argc++] = "--loop";
}
else
{
ppsz_argv[ppsz_argc++] = "--no-loop";
}
b_autoloop = boolValue(argv[i]);
}
else if( !strcmp( argn[i], "toolbar" ) )
{
......@@ -496,6 +491,9 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
vlc_player::open(libvlc_instance);
vlc_player::set_mode(b_autoloop ? libvlc_playback_mode_loop :
libvlc_playback_mode_default);
/*
** fetch plugin base URL, which is the URL of the page containing the plugin
** this URL is used for making absolute URL from relative URL that may be
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment