Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 27th, 2010, 05:16 PM
Registered User
 
Join Date: Dec 2010
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default Using embed to display videos.

I have been using an embed expression to display short 15 sec 2MB mpg files inside ASP pages. The code I have been using is <embed src="<%=sMoviepath%>" width=540" height="400" </embed>. It works well in Google Chrome and used to work in Explorer and Firefox but now is causes FireFox to crash! Is there a better way to display a mpg video that will work on all the popular browsers or do I need to use different code for different browsers. Any help will be appreciated.
 
Old December 27th, 2010, 05:28 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

*** CROSSPOST ***
http://www.aspmessageboard.com/showthread.php?t=234298

Please don't crosspost unless you AT LEAST tell people you are doing so. People will end up wasting their time answering you when you already have an answer in another forum. It's poor netiquette.

By the by, even with the width and height, you are still missing the >.
The Following User Says Thank You to Old Pedant For This Useful Post:
Jimbowino (December 28th, 2010)
 
Old December 28th, 2010, 03:34 PM
Registered User
 
Join Date: Dec 2010
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Smile Solved Issue

Just to follow up on my request. I fixed it by using <object data="" type" " /> rather than <embed src="" />. Only effected Firefox and version 3.0.8 It worked OK in version 3.6.3 - The <object /> code does not seem to work in IE. I am remain interested in how to approach this to be cross platform stable. Any suggestions.

Still out of my depth with this but at least it now works. I apologize about cross posting. Did not know it was poor netiquette.. Live and learn.
 
Old December 28th, 2010, 06:46 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, dunno why you couldn't do some simple browser detection and then plunk in the code version that matches the browser.

You can do
Code:
<%
agent = Request.ServerVariables("HTTP_USER_AGENT")
%>
And then do some minor decoding on that to determine the browser.

For example, on this machine, Firefox shows as
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E)
and MSIE shows as
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
and Chrome shows as
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10

So simply using INSTR() to look for "Firefox" or "MSIE" or "Chrome" would allow you to choose the correct tag, no?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Videos... gbacklin BOOK: Professional iPhone and iPad Application Development 6 February 10th, 2011 02:17 PM
Uploading videos!! ankur_icfai Javascript How-To 1 November 9th, 2006 10:34 AM
Streaming Videos pritambaldota ASP.NET 1.0 and 1.1 Professional 0 August 18th, 2006 06:53 AM
Download videos rajanikrishna HTML Code Clinic 1 October 27th, 2005 05:07 AM
Streaming Videos everest General .NET 0 October 13th, 2005 09:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.