Re: help.how to use mplayerplug to play flv video without type set in the embed tags.
"Youhong.Han" <[email protected]>
| Newsgroups | gmane.comp.mozilla.mplayerplug-in |
|---|---|
| Message-ID | <1184034298.9989.20.camel@hanyh-laptop> |
thank you for your advice.
You can visizt this link "http://www.p-12.cn/flv.html" to check the
phenomenon
I have done these steps,but it doesn't work.
1, enable flash support :add "application/x-shockwave-flash" to the
plugin-setup.cpp . as below:
// FLI
strlcat(MimeTypes,
"video/fli:fli,flc:FLI animation;"
"video/x-fli:fli,flc:FLI animation;", sizeof(MimeTypes));
// SWF
strlcat(MimeTypes,
"application/x-shockwave-flash:swf:SWF animation;",
sizeof(MimeTypes));
2, replace the value of "src" tag with value of "flashvars " tag(
file: plugin-setup.cpp .
if (strncasecmp(parameters->argn[i], "src", 3) == 0) {
//>>>>>. replace the vluae of src tag with value of flashvars tag
for (j = 0; j < parameters->argc; j++) {
if(strcmp(parameters->argn[j], "flashvars") == 0 ) {
printf("\nBegin change the src value: \n");
len = strlen(parameters->argv[j]);
flashpath = (char *) NPN_MemAlloc(sizeof(char) *
( len + 1));
strcpy(flashpath, parameters->argv[j]);
printf("\n before %s
\n",parameters->argv[i]);
NPN_MemFree(parameters->argv[i]);
parameters->argv[i] = (char *)
NPN_MemAlloc(sizeof(char) * ( len + 1));
strcpy(parameters->argv[i], flashpath);
printf("\n end %s
\n",parameters->argv[i]);
NPN_MemFree(flashpath);
break;
}
}
// >>>>>. end modified the value of src tag
if (instance->fname != NULL) {
if (strcmp(instance->fname, parameters->argv[i]) != 0) {
instance->url = strdup(parameters->argv[i]);
if (strncasecmp(parameters->argv[i], "file://", 7)
== 0)
fullyQualifyURL(instance, parameters->argv[i],
instance->url);
instance->state = STATE_HAVEURL;
}
} else {
instance->url = strdup(parameters->argv[i]);
if (strncasecmp(parameters->argv[i], "file://", 7) ==
0)
fullyQualifyURL(instance, parameters->argv[i],
instance->url);
instance->state = STATE_HAVEURL;
}
}
3,write a test.html and visizt
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>view </title>
</head>
<body>
<embed src="./2.swf" align="baseline" border="0" width="350" height="68"
flashvars="./1.flv"
</embed>
</body>
</html>
4, view log
"Begin change the src value:
before ./2.swf
end ./1.flv "
**********NewStream Callback http://localhost/apache2-default/2.swf
****************
in getURLBase
in getURLBase base: http://localhost/apache2-default/2.swf
exiting URL base with http://localhost/apache2-default/
entering getURLHostname
exiting getURLHostname with localhost
Entering SetupPlayer
using url for url
in fullyQualifyURL
item: ./1.flv
baseurl: http://localhost/apache2-default/
hostname: localhost
in fexists
isMms = true
fqu result: ./1.flv
url ./1.flv
*********Exiting NewStream Callback*****************
**WriteReady for http://localhost/apache2-default/2.swf, state =112,
js_state = 6
WR:
n->url= ./1.flv
stream->url= http://localhost/apache2-default/2.swf
5,question:
I don't know how to replace the value of "src" argument with the value
of "flashvars" argument.
Can you give me more advice ?
Thank you
On Mon, 2007-07-09 at 14:02 -0600, Kevin DeKorte wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Youhong Han wrote:
>
> >
> > but if i visit a site with embed tags like this:"
> >
> > <embed width=
> > "320" height="260" bgcolor="#FFFFFF"
> >
> > flashvars="file=/local/local_edu/media/ff808081132e67e001134275cbc72cff.flv&repeat=false&autostart=true"
> > fckeditor_type
> > ="media"
> > allowfullscreen="true"
> > src=
> > "../../mediaplayer.swf"></embed>
> >
> > "
>
> Ok,
>
> It looks like you need to set a mimetype in the embed tag for one. That
> will tell mplayerplug-in to be activated. Use one of the mimetypes found
> in plugin-setup.cpp
>
> the argument 'flashvars' is currently not handled by mplayerplug-in. You
> need to parse that var, use "&" as your argument separator and then
> put the right settings in the right variables. Again look to
> plugin-setup.cpp for clues as to what to do. Look for the code than
> handles the 'filename' argument (around line 610) and see if that is useful.
>
> do you have a site that I can view that shows these examples?
>
> Kevin
>
> - --
> Get my public GnuPG key from
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Remi - http://enigmail.mozdev.org
>
> iD8DBQFGkpRP6w2kMH0L1dERAq2GAJ4yiDjxe0DRAm8sYJ+8PlaQT+Gs2ACgiBXX
> UL+jWo9jxCA16NMeJzDTJ/g=
> =rNFp
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Mplayerplug-in-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mplayerplug-in-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGku36OEjrH14qwSgRAhdWAKCa2Bx0r0d2kZPTbFFRNZvWSqib2QCfbPf7 WnvcG3UgttI3VdxfqUBkTbo= =FUcS -----END PGP SIGNATURE-----