Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Some Questitions about Object Embed

Reply
Thread Tools

Some Questitions about Object Embed

 
 
Alois_Mair
Guest
Posts: n/a
 
      02-19-2008
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


 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      02-19-2008
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.



"Alois_Mair" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Alois_Mair
Guest
Posts: n/a
 
      02-19-2008
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

"George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%(E-Mail Removed)...
> 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.
>
>
>
> "Alois_Mair" <(E-Mail Removed)> wrote in message
> news:%23%(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      02-19-2008
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.


"Alois_Mair" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:%(E-Mail Removed)...
>> 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.
>>
>>
>>
>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>> news:%23%(E-Mail Removed)...
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
Alois_Mair
Guest
Posts: n/a
 
      02-19-2008
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


"George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
news:%(E-Mail Removed)...
>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.
>
>
> "Alois_Mair" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>> news:%(E-Mail Removed)...
>>> 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.
>>>
>>>
>>>
>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>> news:%23%(E-Mail Removed)...
>>>> 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
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      02-19-2008
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>
> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:%(E-Mail Removed)...
>>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.
>>
>>
>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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
>>>
>>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>>> news:%(E-Mail Removed)...
>>>> 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.
>>>>
>>>>
>>>>
>>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>>> news:%23%(E-Mail Removed)...
>>>>> 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
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Alois_Mair
Guest
Posts: n/a
 
      02-19-2008
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" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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
>>
>>
>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>> news:%(E-Mail Removed)...
>>>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.
>>>
>>>
>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> 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
>>>>
>>>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>>>> news:%(E-Mail Removed)...
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>>>> news:%23%(E-Mail Removed)...
>>>>>> 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
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      02-19-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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
>>>
>>>
>>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>>> news:%(E-Mail Removed)...
>>>>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.
>>>>
>>>>
>>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>>> news:(E-Mail Removed)...
>>>>> 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
>>>>>
>>>>> "George Ter-Saakov" <(E-Mail Removed)> schrieb im Newsbeitrag
>>>>> news:%(E-Mail Removed)...
>>>>>> 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.
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Alois_Mair" <(E-Mail Removed)> wrote in message
>>>>>> news:%23%(E-Mail Removed)...
>>>>>>> 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
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
object to object -- embed instead code_wrong HTML 4 05-23-2006 10:05 PM
Object/Embed Helper Control? andchoi@gmail.com ASP .Net 0 11-21-2005 03:31 PM
<APPLET> or <OBJECT>/<EMBED>? Andrew Thompson Java 0 09-30-2005 02:46 AM
Object creation - Do we really need to create a parent for a derieved object - can't the base object just point to an already created base object jon wayne C++ 9 09-22-2005 02:06 AM
embed element/object =?Utf-8?B?UmljaGFyZCBSb2NoZQ==?= ASP .Net 1 12-18-2004 04:13 PM



Advertisments