Some Questitions about Object Embed

A

Alois_Mair

Hello @ll!
i just have a questition: i am actually working on my own video comunity web
site. i already have some nice videos online. For this i want to give my
Comunity an embed link to embed the videos stored on my webhost to their own
sites like youtube...

actually this embed looks like this:

<object width="425" height="355">
<param name="movie" value="player.swf?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="player.swf?file=movie.flv" type="application/x-shockwave-flash"
wmode="transparent" width="425" height="355">
</embed>
</object>

but i am not happy with this embed code because the user knows, where the
player is located also where the file is being stored. With this link i also
have no possiblity to count the video (the counter is stored in mssql)

How can i use an embed link like youtube which looks like this:
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv" type="application/x-shockwave-flash"
wmode="transparent" width="425" height="355">
</embed>
</object>

i want to create an aspx file, which i can use in the embed above. How can i
do this without using any Flash Streaming Addins?
cheers Alois
 
G

George Ter-Saakov

You are on the right track. What seems to be a prblem though?

Just make movie.aspx that will do what you want to do with counter and user
Response.WriteFile.

you might need to set correct content type though.
Use fidler tool (google it) to see what to set ContentType to when returning
..flv file

George.
 
A

Alois_Mair

Hi George,
thank you for your reply, i already have the aspx file with the following
code:

Response.Clear()
' set the content type to SWF
Response.ContentType = "application/x-shockwave-flash"
' add content type header
Response.AddHeader("Content-Type", "application/x-shockwave-flash")
' set the content disposition
Response.AddHeader("Content-Disposition",
"inline;filename=player.swf?file=movie.flv")
' write the buffer with swf file to the output
Response.End()

this doesn't work?
thank you, Alois
 
G

George Ter-Saakov

I do not see the actual line that outputs file to browser.
Response.WriteFile
Can it be a reason so it does not work?

George.
 
A

Alois_Mair

Hi, i have no filehandle, so the Response.WriteFile is raising an error. But
i have found a script, which writes out the embed successfully in fullscreen
to the browser:

'***** >8 movie.aspx
FlashString = "<html><head>"
FlashString += "<script language=""javascript"" type=""text/javascript"">"
FlashString += "function ObjectLoad()"
FlashString += "{"
FlashString += " if ( objectDestination )"
FlashString += " {"
FlashString += " var bodyElement =
objectDestination.parentElement;"
FlashString += " if ( bodyElement.objectSource )"
FlashString += " {"
FlashString += " bodyElement.innerHTML = ""<embed width=100%
height=100% fullscreen=yes>"";"
FlashString += " bodyElement.firstChild.src =
bodyElement.objectSource;"
FlashString += " }"
FlashString += " }"
FlashString += "}"
FlashString += "<" & "/" & "script></head>"
FlashString += "<body objectSource=""player.swf?file=movie.flv""
FlashString += " onload=""ObjectLoad();"" leftmargin=0 topmargin=0
scroll=no> <form id=""objectDestination""></form></body></html>"

Response.Clear()
Response.AddHeader("Content-Disposition", "inline;")
'Response.AddHeader("Content-Type", "application/x-shockwave-flash") <=
This is out commented, because this doesn't work ?!
Response.Write(FlashString)
Response.End()

This Code Snippets in the movie.aspx returns the working flashplayer with
the given movie. This Works fine. But using this movie.aspx within an embed
this doesn't work anymore:

'******* >8 player.aspx
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv" type="application/x-shockwave-flash"
wmode="transparent" width="425" height="355">
</embed>
</object>

Is this the right way? or should i try to use the Response.WriteFile()? How
can i use WriteFile?
Thanks Alois
 
G

George Ter-Saakov

You are confusing me now.....
You need to have 2 aspx pages.
1. First page will produce html with the object tag. (Does not matter how
you do it with Javascript or not)
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

2. Second page is movie.aspx that should have folowing code.
....increment counter.....
....output movie....
Response.Clear();
Response.ContentType = "application/x-shockwave-flash";
Response.AddHeader("Content-Type", "application/x-shockwave-flash");
Response.WriteFile(Server.MapPath("~/mymoviefolder/" + Request[file]));
Response.End();



George.
 
A

Alois_Mair

Hello George,

thank you for your reply. Yes, thats true, i have 2 aspx files. one with the
embed and the second, which produces the embed object.

i also have a player (swf) and a flash file (flv) OR a player (swf) and a
streamed file (rmtp). for this it was my idea to "prepare" the object with
the player and the movie and give this constellation to the embed object.
how can i do this with the WriteFile and MapPath?

Thanks a lot
Alois


George Ter-Saakov said:
You are confusing me now.....
You need to have 2 aspx pages.
1. First page will produce html with the object tag. (Does not matter how
you do it with Javascript or not)
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

2. Second page is movie.aspx that should have folowing code.
...increment counter.....
...output movie....
Response.Clear();
Response.ContentType = "application/x-shockwave-flash";
Response.AddHeader("Content-Type", "application/x-shockwave-flash");
Response.WriteFile(Server.MapPath("~/mymoviefolder/" + Request[file]));
Response.End();



George.

Alois_Mair said:
Hi, i have no filehandle, so the Response.WriteFile is raising an error.
But i have found a script, which writes out the embed successfully in
fullscreen to the browser:

'***** >8 movie.aspx
FlashString = "<html><head>"
FlashString += "<script language=""javascript""
type=""text/javascript"">"
FlashString += "function ObjectLoad()"
FlashString += "{"
FlashString += " if ( objectDestination )"
FlashString += " {"
FlashString += " var bodyElement =
objectDestination.parentElement;"
FlashString += " if ( bodyElement.objectSource )"
FlashString += " {"
FlashString += " bodyElement.innerHTML = ""<embed width=100%
height=100% fullscreen=yes>"";"
FlashString += " bodyElement.firstChild.src =
bodyElement.objectSource;"
FlashString += " }"
FlashString += " }"
FlashString += "}"
FlashString += "<" & "/" & "script></head>"
FlashString += "<body objectSource=""player.swf?file=movie.flv""
FlashString += " onload=""ObjectLoad();"" leftmargin=0 topmargin=0
scroll=no> <form id=""objectDestination""></form></body></html>"

Response.Clear()
Response.AddHeader("Content-Disposition", "inline;")
'Response.AddHeader("Content-Type", "application/x-shockwave-flash") <=
This is out commented, because this doesn't work ?!
Response.Write(FlashString)
Response.End()

This Code Snippets in the movie.aspx returns the working flashplayer with
the given movie. This Works fine. But using this movie.aspx within an
embed this doesn't work anymore:

'******* >8 player.aspx
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

Is this the right way? or should i try to use the Response.WriteFile()?
How can i use WriteFile?
Thanks Alois
 
G

George Ter-Saakov

Your value has such preparation value="movie.aspx?file=movie.flv"

It tells the flash player to load movie from movie.aspx.

The movie.aspx in return must return the physical file...Thus you need to
use WriteFile. And you need to use MapPath just because WriteFile takes
physical path (like C:\intepub\myfile.flv).

George.



Alois_Mair said:
Hello George,

thank you for your reply. Yes, thats true, i have 2 aspx files. one with
the embed and the second, which produces the embed object.

i also have a player (swf) and a flash file (flv) OR a player (swf) and a
streamed file (rmtp). for this it was my idea to "prepare" the object with
the player and the movie and give this constellation to the embed object.
how can i do this with the WriteFile and MapPath?

Thanks a lot
Alois


George Ter-Saakov said:
You are confusing me now.....
You need to have 2 aspx pages.
1. First page will produce html with the object tag. (Does not matter how
you do it with Javascript or not)
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

2. Second page is movie.aspx that should have folowing code.
...increment counter.....
...output movie....
Response.Clear();
Response.ContentType = "application/x-shockwave-flash";
Response.AddHeader("Content-Type", "application/x-shockwave-flash");
Response.WriteFile(Server.MapPath("~/mymoviefolder/" + Request[file]));
Response.End();



George.

Alois_Mair said:
Hi, i have no filehandle, so the Response.WriteFile is raising an error.
But i have found a script, which writes out the embed successfully in
fullscreen to the browser:

'***** >8 movie.aspx
FlashString = "<html><head>"
FlashString += "<script language=""javascript""
type=""text/javascript"">"
FlashString += "function ObjectLoad()"
FlashString += "{"
FlashString += " if ( objectDestination )"
FlashString += " {"
FlashString += " var bodyElement =
objectDestination.parentElement;"
FlashString += " if ( bodyElement.objectSource )"
FlashString += " {"
FlashString += " bodyElement.innerHTML = ""<embed width=100%
height=100% fullscreen=yes>"";"
FlashString += " bodyElement.firstChild.src =
bodyElement.objectSource;"
FlashString += " }"
FlashString += " }"
FlashString += "}"
FlashString += "<" & "/" & "script></head>"
FlashString += "<body objectSource=""player.swf?file=movie.flv""
FlashString += " onload=""ObjectLoad();"" leftmargin=0 topmargin=0
scroll=no> <form id=""objectDestination""></form></body></html>"

Response.Clear()
Response.AddHeader("Content-Disposition", "inline;")
'Response.AddHeader("Content-Type", "application/x-shockwave-flash") <=
This is out commented, because this doesn't work ?!
Response.Write(FlashString)
Response.End()

This Code Snippets in the movie.aspx returns the working flashplayer
with the given movie. This Works fine. But using this movie.aspx within
an embed this doesn't work anymore:

'******* >8 player.aspx
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

Is this the right way? or should i try to use the Response.WriteFile()?
How can i use WriteFile?
Thanks Alois


I do not see the actual line that outputs file to browser.
Response.WriteFile
Can it be a reason so it does not work?

George.


Hi George,
thank you for your reply, i already have the aspx file with the
following code:

Response.Clear()
' set the content type to SWF
Response.ContentType = "application/x-shockwave-flash"
' add content type header
Response.AddHeader("Content-Type",
"application/x-shockwave-flash")
' set the content disposition
Response.AddHeader("Content-Disposition",
"inline;filename=player.swf?file=movie.flv")
' write the buffer with swf file to the output
Response.End()

this doesn't work?
thank you, Alois

You are on the right track. What seems to be a prblem though?

Just make movie.aspx that will do what you want to do with counter
and user Response.WriteFile.

you might need to set correct content type though.
Use fidler tool (google it) to see what to set ContentType to when
returning .flv file

George.



Hello @ll!
i just have a questition: i am actually working on my own video
comunity web site. i already have some nice videos online. For this
i want to give my Comunity an embed link to embed the videos stored
on my webhost to their own sites like youtube...

actually this embed looks like this:

<object width="425" height="355">
<param name="movie" value="player.swf?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="player.swf?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

but i am not happy with this embed code because the user knows,
where the player is located also where the file is being stored.
With this link i also have no possiblity to count the video (the
counter is stored in mssql)

How can i use an embed link like youtube which looks like this:
<object width="425" height="355">
<param name="movie" value="movie.aspx?file=movie.flv"></param>
<param name="wmode" value="transparent"></param>
<embed src="movie.aspx?file=movie.flv"
type="application/x-shockwave-flash" wmode="transparent" width="425"
height="355">
</embed>
</object>

i want to create an aspx file, which i can use in the embed above.
How can i do this without using any Flash Streaming Addins?
cheers Alois
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top