Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
df9d73dd
Commit
df9d73dd
authored
Aug 29, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- compatibility fixes for FireFox, Safari and Opera 9
- fixed a couple of crashes on MacOS X
parent
4902ffc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
120 additions
and
121 deletions
+120
-121
mozilla/control/npolibvlc.cpp
mozilla/control/npolibvlc.cpp
+40
-44
mozilla/support/npmac.cpp
mozilla/support/npmac.cpp
+60
-60
mozilla/test.html
mozilla/test.html
+16
-14
mozilla/vlcshell.cpp
mozilla/vlcshell.cpp
+4
-3
No files found.
mozilla/control/npolibvlc.cpp
View file @
df9d73dd
...
...
@@ -494,7 +494,7 @@ const NPUTF8 * const LibvlcPlaylistNPObject::methodNames[] =
{
"add"
,
"play"
,
"togglepause"
"togglepause"
,
"stop"
,
"next"
,
"prev"
,
...
...
@@ -811,63 +811,59 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &s, int *i_options, cha
void
LibvlcPlaylistNPObject
::
parseOptions
(
NPObject
*
obj
,
int
*
i_options
,
char
***
ppsz_options
)
{
/* WARNING: Safari does not implement NPN_HasProperty/NPN_HasMethod */
NPVariant
value
;
/* we are expecting to have a Javascript Array object */
NPIdentifier
name
=
NPN_GetStringIdentifier
(
"length"
);
if
(
NPN_
HasProperty
(
_instance
,
obj
,
nam
e
)
)
NPIdentifier
propId
=
NPN_GetStringIdentifier
(
"length"
);
if
(
NPN_
GetProperty
(
_instance
,
obj
,
propId
,
&
valu
e
)
)
{
NPVariant
value
;
if
(
NPN_GetProperty
(
_instance
,
obj
,
name
,
&
value
)
)
{
int
count
=
numberValue
(
value
);
NPN_ReleaseVariantValue
(
&
value
);
int
count
=
numberValue
(
value
);
NPN_ReleaseVariantValue
(
&
value
);
if
(
count
)
if
(
count
)
{
long
capacity
=
16
;
char
**
options
=
(
char
**
)
malloc
(
capacity
*
sizeof
(
char
*
));
if
(
options
)
{
long
capacity
=
16
;
char
**
options
=
(
char
**
)
malloc
(
capacity
*
sizeof
(
char
*
));
if
(
options
)
int
nOptions
=
0
;
while
(
nOptions
<
count
)
{
int
nOptions
=
0
;
propId
=
NPN_GetIntIdentifier
(
nOptions
);
if
(
!
NPN_GetProperty
(
_instance
,
obj
,
propId
,
&
value
)
)
/* return what we got so far */
break
;
while
(
nOptions
<
count
)
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
{
name
=
NPN_GetIntIdentifier
(
nOptions
);
if
(
!
NPN_HasProperty
(
_instance
,
obj
,
name
)
)
/* return what we got so far */
break
;
if
(
!
NPN_GetProperty
(
_instance
,
obj
,
name
,
&
value
)
)
/* return what we got so far */
break
;
/* return what we got so far */
NPN_ReleaseVariantValue
(
&
value
);
break
;
}
if
(
!
NPVARIANT_IS_STRING
(
value
)
)
if
(
nOptions
==
capacity
)
{
capacity
+=
16
;
char
**
moreOptions
=
(
char
**
)
realloc
(
options
,
capacity
*
sizeof
(
char
*
));
if
(
!
moreOptions
)
{
/*
return what we got so far
*/
/*
failed to allocate more memory
*/
NPN_ReleaseVariantValue
(
&
value
);
/* return what we got so far */
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
break
;
}
if
(
nOptions
==
capacity
)
{
capacity
+=
16
;
char
**
moreOptions
=
(
char
**
)
realloc
(
options
,
capacity
*
sizeof
(
char
*
));
if
(
!
moreOptions
)
{
/* failed to allocate more memory */
NPN_ReleaseVariantValue
(
&
value
);
/* return what we got so far */
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
break
;
}
options
=
moreOptions
;
}
options
[
nOptions
++
]
=
stringValue
(
value
);
options
=
moreOptions
;
}
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
options
[
nOptions
++
]
=
stringValue
(
value
)
;
}
*
i_options
=
nOptions
;
*
ppsz_options
=
options
;
}
}
}
...
...
mozilla/support/npmac.cpp
View file @
df9d73dd
...
...
@@ -399,7 +399,7 @@ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_GetStringIdentifierProc
(
gNetscapeFuncs
.
getstringidentifier
,
name
);
return
CallNPN_GetStringIdentifierProc
(
gNetscapeFuncs
.
getstringidentifier
,
name
);
}
return
NULL
;
}
...
...
@@ -409,7 +409,7 @@ void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentif
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
CallNPN_GetStringIdentifiersProc
(
gNetscapeFuncs
.
getstringidentifiers
,
names
,
nameCount
,
identifiers
);
CallNPN_GetStringIdentifiersProc
(
gNetscapeFuncs
.
getstringidentifiers
,
names
,
nameCount
,
identifiers
);
}
}
...
...
@@ -418,7 +418,7 @@ NPIdentifier NPN_GetIntIdentifier(int32_t intid)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_GetIntIdentifierProc
(
gNetscapeFuncs
.
getintidentifier
,
intid
);
return
CallNPN_GetIntIdentifierProc
(
gNetscapeFuncs
.
getintidentifier
,
intid
);
}
return
NULL
;
}
...
...
@@ -428,7 +428,7 @@ bool NPN_IdentifierIsString(NPIdentifier identifier)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_IdentifierIsStringProc
(
gNetscapeFuncs
.
identifierisstring
,
identifier
);
return
CallNPN_IdentifierIsStringProc
(
gNetscapeFuncs
.
identifierisstring
,
identifier
);
}
return
false
;
}
...
...
@@ -438,7 +438,7 @@ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_UTF8FromIdentifierProc
(
gNetscapeFuncs
.
utf8fromidentifier
,
identifier
);
return
CallNPN_UTF8FromIdentifierProc
(
gNetscapeFuncs
.
utf8fromidentifier
,
identifier
);
}
return
NULL
;
}
...
...
@@ -448,7 +448,7 @@ int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_IntFromIdentifierProc
(
gNetscapeFuncs
.
intfromidentifier
,
identifier
);
return
CallNPN_IntFromIdentifierProc
(
gNetscapeFuncs
.
intfromidentifier
,
identifier
);
}
return
0
;
}
...
...
@@ -458,7 +458,7 @@ NPObject *NPN_CreateObject(NPP instance, NPClass *aClass)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_CreateObjectProc
(
gNetscapeFuncs
.
createobject
,
instance
,
aClass
);
return
CallNPN_CreateObjectProc
(
gNetscapeFuncs
.
createobject
,
instance
,
aClass
);
}
return
NULL
;
}
...
...
@@ -468,7 +468,7 @@ NPObject *NPN_RetainObject(NPObject *npobj)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_RetainObjectProc
(
gNetscapeFuncs
.
retainobject
,
npobj
);
return
CallNPN_RetainObjectProc
(
gNetscapeFuncs
.
retainobject
,
npobj
);
}
return
NULL
;
}
...
...
@@ -478,7 +478,7 @@ void NPN_ReleaseObject(NPObject *npobj)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
CallNPN_ReleaseObjectProc
(
gNetscapeFuncs
.
releaseobject
,
npobj
);
CallNPN_ReleaseObjectProc
(
gNetscapeFuncs
.
releaseobject
,
npobj
);
}
}
...
...
@@ -487,7 +487,7 @@ bool NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName, const NP
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_InvokeProc
(
gNetscapeFuncs
.
invoke
,
instance
,
npobj
,
methodName
,
args
,
argCount
,
result
);
return
CallNPN_InvokeProc
(
gNetscapeFuncs
.
invoke
,
instance
,
npobj
,
methodName
,
args
,
argCount
,
result
);
}
return
false
;
}
...
...
@@ -497,7 +497,7 @@ bool NPN_InvokeDefault(NPP instance, NPObject *npobj, const NPVariant *args, uin
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_InvokeDefaultProc
(
gNetscapeFuncs
.
invokeDefault
,
instance
,
npobj
,
args
,
argCount
,
result
);
return
CallNPN_InvokeDefaultProc
(
gNetscapeFuncs
.
invokeDefault
,
instance
,
npobj
,
args
,
argCount
,
result
);
}
return
false
;
}
...
...
@@ -507,7 +507,7 @@ bool NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *re
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_EvaluateProc
(
gNetscapeFuncs
.
evaluate
,
instance
,
npobj
,
script
,
result
);
return
CallNPN_EvaluateProc
(
gNetscapeFuncs
.
evaluate
,
instance
,
npobj
,
script
,
result
);
}
return
false
;
}
...
...
@@ -517,7 +517,7 @@ bool NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, N
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_GetPropertyProc
(
gNetscapeFuncs
.
getproperty
,
instance
,
npobj
,
propertyName
,
result
);
return
CallNPN_GetPropertyProc
(
gNetscapeFuncs
.
getproperty
,
instance
,
npobj
,
propertyName
,
result
);
}
return
false
;
}
...
...
@@ -527,7 +527,7 @@ bool NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName, c
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_SetPropertyProc
(
gNetscapeFuncs
.
setproperty
,
instance
,
npobj
,
propertyName
,
value
);
return
CallNPN_SetPropertyProc
(
gNetscapeFuncs
.
setproperty
,
instance
,
npobj
,
propertyName
,
value
);
}
return
false
;
}
...
...
@@ -537,7 +537,7 @@ bool NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_RemovePropertyProc
(
gNetscapeFuncs
.
removeproperty
,
instance
,
npobj
,
propertyName
);
return
CallNPN_RemovePropertyProc
(
gNetscapeFuncs
.
removeproperty
,
instance
,
npobj
,
propertyName
);
}
return
false
;
}
...
...
@@ -547,7 +547,7 @@ bool NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_HasPropertyProc
(
gNetscapeFuncs
.
hasproperty
,
instance
,
npobj
,
propertyName
);
return
CallNPN_HasPropertyProc
(
gNetscapeFuncs
.
hasproperty
,
instance
,
npobj
,
propertyName
);
}
return
false
;
}
...
...
@@ -557,7 +557,7 @@ bool NPN_HasMethod(NPP instance, NPObject *npobj, NPIdentifier methodName)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
return
CallNPN_HasMethodProc
(
gNetscapeFuncs
.
hasmethod
,
instance
,
npobj
,
methodName
);
return
CallNPN_HasMethodProc
(
gNetscapeFuncs
.
hasmethod
,
instance
,
npobj
,
methodName
);
}
return
false
;
}
...
...
@@ -567,7 +567,7 @@ void NPN_ReleaseVariantValue(NPVariant *variant)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
CallNPN_ReleaseVariantValueProc
(
gNetscapeFuncs
.
releasevariantvalue
,
variant
);
CallNPN_ReleaseVariantValueProc
(
gNetscapeFuncs
.
releasevariantvalue
,
variant
);
}
}
...
...
@@ -576,7 +576,7 @@ void NPN_SetException(NPObject *npobj, const NPUTF8 *message)
int
navMinorVers
=
gNetscapeFuncs
.
version
&
0xFF
;
if
(
navMinorVers
>=
14
)
{
CallNPN_SetExceptionProc
(
gNetscapeFuncs
.
setexception
,
npobj
,
message
);
CallNPN_SetExceptionProc
(
gNetscapeFuncs
.
setexception
,
npobj
,
message
);
}
}
...
...
@@ -967,27 +967,27 @@ DEFINE_API_C(NPError) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs,
gNetscapeFuncs
.
forceredraw
=
(
NPN_ForceRedrawUPP
)
HOST_TO_PLUGIN_GLUE
(
forceredraw
,
nsTable
->
forceredraw
);
if
(
navMinorVers
>=
14
)
{
// NPRuntime support
gNetscapeFuncs
.
getstringidentifier
=
(
NPN_GetStringIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
getstringidentifier
,
nsTable
->
getstringidentifier
);
gNetscapeFuncs
.
getstringidentifiers
=
(
NPN_GetStringIdentifiersUPP
)
HOST_TO_PLUGIN_GLUE
(
getstringidentifiers
,
nsTable
->
getstringidentifiers
);
gNetscapeFuncs
.
getintidentifier
=
(
NPN_GetIntIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
getintidentifier
,
nsTable
->
getintidentifier
);
gNetscapeFuncs
.
identifierisstring
=
(
NPN_IdentifierIsStringUPP
)
HOST_TO_PLUGIN_GLUE
(
identifierisstring
,
nsTable
->
identifierisstring
);
gNetscapeFuncs
.
utf8fromidentifier
=
(
NPN_UTF8FromIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
utf8fromidentifier
,
nsTable
->
utf8fromidentifier
);
gNetscapeFuncs
.
intfromidentifier
=
(
NPN_IntFromIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
intfromidentifier
,
nsTable
->
intfromidentifier
);
gNetscapeFuncs
.
createobject
=
(
NPN_CreateObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
createobject
,
nsTable
->
createobject
);
gNetscapeFuncs
.
retainobject
=
(
NPN_RetainObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
retainobject
,
nsTable
->
retainobject
);
gNetscapeFuncs
.
releaseobject
=
(
NPN_ReleaseObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
releaseobject
,
nsTable
->
releaseobject
);
gNetscapeFuncs
.
invoke
=
(
NPN_InvokeUPP
)
HOST_TO_PLUGIN_GLUE
(
invoke
,
nsTable
->
invoke
);
gNetscapeFuncs
.
invokeDefault
=
(
NPN_InvokeDefaultUPP
)
HOST_TO_PLUGIN_GLUE
(
invokeDefault
,
nsTable
->
invokeDefault
);
gNetscapeFuncs
.
evaluate
=
(
NPN_EvaluateUPP
)
HOST_TO_PLUGIN_GLUE
(
evaluate
,
nsTable
->
evaluate
);
gNetscapeFuncs
.
getproperty
=
(
NPN_GetPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
getproperty
,
nsTable
->
getproperty
);
gNetscapeFuncs
.
setproperty
=
(
NPN_SetPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
setproperty
,
nsTable
->
setproperty
);
gNetscapeFuncs
.
removeproperty
=
(
NPN_RemovePropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
removeproperty
,
nsTable
->
removeproperty
);
gNetscapeFuncs
.
hasproperty
=
(
NPN_HasPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
hasproperty
,
nsTable
->
hasproperty
);
gNetscapeFuncs
.
hasmethod
=
(
NPN_HasMethodUPP
)
HOST_TO_PLUGIN_GLUE
(
hasmethod
,
nsTable
->
hasmethod
);
gNetscapeFuncs
.
releasevariantvalue
=
(
NPN_ReleaseVariantValueUPP
)
HOST_TO_PLUGIN_GLUE
(
releasevariantvalue
,
nsTable
->
releasevariantvalue
);
gNetscapeFuncs
.
setexception
=
(
NPN_SetExceptionUPP
)
HOST_TO_PLUGIN_GLUE
(
setexception
,
nsTable
->
setexception
);
}
// NPRuntime support
gNetscapeFuncs
.
getstringidentifier
=
(
NPN_GetStringIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
getstringidentifier
,
nsTable
->
getstringidentifier
);
gNetscapeFuncs
.
getstringidentifiers
=
(
NPN_GetStringIdentifiersUPP
)
HOST_TO_PLUGIN_GLUE
(
getstringidentifiers
,
nsTable
->
getstringidentifiers
);
gNetscapeFuncs
.
getintidentifier
=
(
NPN_GetIntIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
getintidentifier
,
nsTable
->
getintidentifier
);
gNetscapeFuncs
.
identifierisstring
=
(
NPN_IdentifierIsStringUPP
)
HOST_TO_PLUGIN_GLUE
(
identifierisstring
,
nsTable
->
identifierisstring
);
gNetscapeFuncs
.
utf8fromidentifier
=
(
NPN_UTF8FromIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
utf8fromidentifier
,
nsTable
->
utf8fromidentifier
);
gNetscapeFuncs
.
intfromidentifier
=
(
NPN_IntFromIdentifierUPP
)
HOST_TO_PLUGIN_GLUE
(
intfromidentifier
,
nsTable
->
intfromidentifier
);
gNetscapeFuncs
.
createobject
=
(
NPN_CreateObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
createobject
,
nsTable
->
createobject
);
gNetscapeFuncs
.
retainobject
=
(
NPN_RetainObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
retainobject
,
nsTable
->
retainobject
);
gNetscapeFuncs
.
releaseobject
=
(
NPN_ReleaseObjectUPP
)
HOST_TO_PLUGIN_GLUE
(
releaseobject
,
nsTable
->
releaseobject
);
gNetscapeFuncs
.
invoke
=
(
NPN_InvokeUPP
)
HOST_TO_PLUGIN_GLUE
(
invoke
,
nsTable
->
invoke
);
gNetscapeFuncs
.
invokeDefault
=
(
NPN_InvokeDefaultUPP
)
HOST_TO_PLUGIN_GLUE
(
invokeDefault
,
nsTable
->
invokeDefault
);
gNetscapeFuncs
.
evaluate
=
(
NPN_EvaluateUPP
)
HOST_TO_PLUGIN_GLUE
(
evaluate
,
nsTable
->
evaluate
);
gNetscapeFuncs
.
getproperty
=
(
NPN_GetPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
getproperty
,
nsTable
->
getproperty
);
gNetscapeFuncs
.
setproperty
=
(
NPN_SetPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
setproperty
,
nsTable
->
setproperty
);
gNetscapeFuncs
.
removeproperty
=
(
NPN_RemovePropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
removeproperty
,
nsTable
->
removeproperty
);
gNetscapeFuncs
.
hasproperty
=
(
NPN_HasPropertyUPP
)
HOST_TO_PLUGIN_GLUE
(
hasproperty
,
nsTable
->
hasproperty
);
gNetscapeFuncs
.
hasmethod
=
(
NPN_HasMethodUPP
)
HOST_TO_PLUGIN_GLUE
(
hasmethod
,
nsTable
->
hasmethod
);
gNetscapeFuncs
.
releasevariantvalue
=
(
NPN_ReleaseVariantValueUPP
)
HOST_TO_PLUGIN_GLUE
(
releasevariantvalue
,
nsTable
->
releasevariantvalue
);
gNetscapeFuncs
.
setexception
=
(
NPN_SetExceptionUPP
)
HOST_TO_PLUGIN_GLUE
(
setexception
,
nsTable
->
setexception
);
}
//
// Set up the plugin function table that Netscape will use to
...
...
@@ -1111,26 +1111,26 @@ NPError NP_Initialize(NPNetscapeFuncs* nsTable)
gNetscapeFuncs
.
forceredraw
=
nsTable
->
forceredraw
;
if
(
navMinorVers
>=
14
)
{
// NPRuntime support
gNetscapeFuncs
.
getstringidentifier
=
nsTable
->
getstringidentifier
;
gNetscapeFuncs
.
getstringidentifiers
=
nsTable
->
getstringidentifiers
;
gNetscapeFuncs
.
getintidentifier
=
nsTable
->
getintidentifier
;
gNetscapeFuncs
.
identifierisstring
=
nsTable
->
identifierisstring
;
gNetscapeFuncs
.
utf8fromidentifier
=
nsTable
->
utf8fromidentifier
;
gNetscapeFuncs
.
intfromidentifier
=
nsTable
->
intfromidentifier
;
gNetscapeFuncs
.
createobject
=
nsTable
->
createobject
;
gNetscapeFuncs
.
retainobject
=
nsTable
->
retainobject
;
gNetscapeFuncs
.
releaseobject
=
nsTable
->
releaseobject
;
gNetscapeFuncs
.
invoke
=
nsTable
->
invoke
;
gNetscapeFuncs
.
invokeDefault
=
nsTable
->
invokeDefault
;
gNetscapeFuncs
.
evaluate
=
nsTable
->
evaluate
;
gNetscapeFuncs
.
getproperty
=
nsTable
->
getproperty
;
gNetscapeFuncs
.
setproperty
=
nsTable
->
setproperty
;
gNetscapeFuncs
.
removeproperty
=
nsTable
->
removeproperty
;
gNetscapeFuncs
.
hasproperty
=
nsTable
->
hasproperty
;
gNetscapeFuncs
.
hasmethod
=
nsTable
->
hasmethod
;
gNetscapeFuncs
.
releasevariantvalue
=
nsTable
->
releasevariantvalue
;
gNetscapeFuncs
.
setexception
=
nsTable
->
setexception
;
// NPRuntime support
gNetscapeFuncs
.
getstringidentifier
=
nsTable
->
getstringidentifier
;
gNetscapeFuncs
.
getstringidentifiers
=
nsTable
->
getstringidentifiers
;
gNetscapeFuncs
.
getintidentifier
=
nsTable
->
getintidentifier
;
gNetscapeFuncs
.
identifierisstring
=
nsTable
->
identifierisstring
;
gNetscapeFuncs
.
utf8fromidentifier
=
nsTable
->
utf8fromidentifier
;
gNetscapeFuncs
.
intfromidentifier
=
nsTable
->
intfromidentifier
;
gNetscapeFuncs
.
createobject
=
nsTable
->
createobject
;
gNetscapeFuncs
.
retainobject
=
nsTable
->
retainobject
;
gNetscapeFuncs
.
releaseobject
=
nsTable
->
releaseobject
;
gNetscapeFuncs
.
invoke
=
nsTable
->
invoke
;
gNetscapeFuncs
.
invokeDefault
=
nsTable
->
invokeDefault
;
gNetscapeFuncs
.
evaluate
=
nsTable
->
evaluate
;
gNetscapeFuncs
.
getproperty
=
nsTable
->
getproperty
;
gNetscapeFuncs
.
setproperty
=
nsTable
->
setproperty
;
gNetscapeFuncs
.
removeproperty
=
nsTable
->
removeproperty
;
gNetscapeFuncs
.
hasproperty
=
nsTable
->
hasproperty
;
gNetscapeFuncs
.
hasmethod
=
nsTable
->
hasmethod
;
gNetscapeFuncs
.
releasevariantvalue
=
nsTable
->
releasevariantvalue
;
gNetscapeFuncs
.
setexception
=
nsTable
->
setexception
;
}
return
NPP_Initialize
();
}
...
...
mozilla/test.html
View file @
df9d73dd
...
...
@@ -19,20 +19,20 @@ MRL:
</TD></TR>
<TR><TD
colspan=
"2"
>
<INPUT
type=
button
id=
"PlayOrPause"
value=
" Play "
onClick=
'doPlayOrPause()'
>
<INPUT
type=
button
value=
"Stop"
onClick=
'document.
vlc
.playlist.stop();'
>
<INPUT
type=
button
value=
"Stop"
onClick=
'document.
getElementById("vlc")
.playlist.stop();'
>
<INPUT
type=
button
value=
" << "
onClick=
'document.
vlc
.playlist.playSlower();'
>
<INPUT
type=
button
value=
" >> "
onClick=
'document.
vlc
.playlist.playFaster();'
>
<INPUT
type=
button
value=
" << "
onClick=
'document.
getElementById("vlc")
.playlist.playSlower();'
>
<INPUT
type=
button
value=
" >> "
onClick=
'document.
getElementById("vlc")
.playlist.playFaster();'
>
<INPUT
type=
button
value=
"Show"
onClick=
'document.
vlc
.visible = true;'
>
<INPUT
type=
button
value=
"Hide"
onClick=
'document.
vlc
.visible = false;'
>
<INPUT
type=
button
value=
"Show"
onClick=
'document.
getElementById("vlc")
.visible = true;'
>
<INPUT
type=
button
value=
"Hide"
onClick=
'document.
getElementById("vlc")
.visible = false;'
>
<INPUT
type=
button
value=
"Version"
onClick=
'alert(document.
vlc
.VersionInfo);'
>
<INPUT
type=
button
value=
"Version"
onClick=
'alert(document.
getElementById("vlc")
.VersionInfo);'
>
<SPAN
style=
"text-align:center"
>
Volume:
</SPAN>
<INPUT
type=
button
value=
" - "
onClick=
'updateVolume(-10)'
>
<SPAN
id=
"volumeTextField"
style=
"text-align: center"
>
--
</SPAN>
<INPUT
type=
button
value=
" + "
onClick=
'updateVolume(+10)'
>
<INPUT
type=
button
value=
"Mute"
onClick=
'document.
vlc
.audio.togglemute();'
>
<INPUT
type=
button
value=
"Mute"
onClick=
'document.
getElementById("vlc")
.audio.togglemute();'
>
</TD>
</TR>
</TABLE>
...
...
@@ -42,9 +42,9 @@ var timerId = 0;
function updateVolume(deltaVol)
{
var
plugin = document.getElementById('vlc'
);
plugin
.audio.volume += deltaVol;
volumeTextField.innerText =
plugin
.audio.volume+"%";
var
vlc = document.getElementById("vlc"
);
vlc
.audio.volume += deltaVol;
volumeTextField.innerText =
vlc
.audio.volume+"%";
};
function formatTime(timeVal)
{
...
...
@@ -80,6 +80,7 @@ var liveFeedRoll = 0;
function doUpdate()
{
var vlc = document.getElementById("vlc");
if( vlc.playlist.isplaying )
{
if( vlc.input.length > 0 )
...
...
@@ -103,17 +104,18 @@ function doUpdate()
function doGo(targetURL)
{
var options = new Array(":vout-filter=deinterlace", ":deinterlace-mode=linear");
document.
vlc
.playlist.add(targetURL, null, options);
document.
getElementById("vlc")
.playlist.add(targetURL, null, options);
};
function doPlayOrPause()
{
if( document.vlc.playlist.isplaying )
var vlc = document.getElementById("vlc");
if( vlc.playlist.isplaying )
{
document.
vlc.playlist.pause();
vlc.playlist.pause();
}
else
{
document.
vlc.playlist.play();
vlc.playlist.play();
}
};
function vlcPlayEvent()
...
...
mozilla/vlcshell.cpp
View file @
df9d73dd
...
...
@@ -176,10 +176,11 @@ int16 NPP_HandleEvent( NPP instance, void * event )
}
}
}
if
(
needsDisplay
)
{
const
NPWindow
*
npwindow
=
p_plugin
->
getWindow
();
const
NPWindow
*
npwindow
=
p_plugin
->
getWindow
();
if
(
needsDisplay
&&
npwindow
->
window
)
{
/* draw the beautiful "No Picture" */
ForeColor
(
blackColor
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment