Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Streaming video for cross-browsers

Posted on 2008-09-30
4
Medium Priority
?
262 Views
Last Modified: 2013-11-19
I can't believe I can't find an answer for this.  I would like to live stream a series of videos that can be launched from Explorer OR Firefox or Safari, etc.  I used to have two formats, wmv and mov with a form so the user could select if they want to run it in Windows or Quicktime.  But I'd rather avoid that step and have one format.

So i now have a site with mpg1 files, which is ok, and runs in various video players, but I don't have control over the size.  If I set the size in height/width, it may or may not have controls at the bottom that will make it less high and then stretch it sideways.

I would like to turn the controls off, or at least control the size.  I currently have the following simple embed tag.

Do I need to check for player type (media player, Quicktime) and modify my code accordingly, or is there a way to set the size and controllers?  

<embed src='video/<? echo $_GET['vid'] ?>.mpg' controller='true' controls='false' loop='false' autostart='true' ></embed>

Open in new window

0
Comment
Question by:dougfosterNYC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 

Author Comment

by:dougfosterNYC
ID: 22610983
0
 

Author Comment

by:dougfosterNYC
ID: 22613517
Is this too hard a question?  I've maxed the point value.
0
 

Accepted Solution

by:
dougfosterNYC earned 0 total points
ID: 22623855
I will answer my own question.  Video issues seem to be a weakpoint here on EE.  I am using MOV files and MPEG1 files, both work with the code below.  It uses Quicktime as a player, which most people have, I believe, even on Windows/IE machines.  
I haven't tested it with a machine without QT.  
But having the <object> tag, which is proper, and the <embed> tag within for browsers not understanding the object tab, should handle all situations.

<? if (isset($_GET["thewidth"])){
		$thewidth = $_GET["thewidth"];
		$theheight = $_GET["theheight"]+15;
	} else {
		$thewidth = 352;
		$theheight = 244;	} ?>
................
	<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="<? echo $thewidth; ?>" HEIGHT="<? echo $theheight; ?>" 
	CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
		<PARAM NAME="src" VALUE="video/<? echo $_GET['vid']; ?>">
		<PARAM NAME="autoplay" VALUE="true">
		<PARAM NAME="controller" VALUE="true">
		<PARAM NAME="loop" VALUE="false">
		<EMBED SRC="video/<? echo $_GET['vid']; ?>" WIDTH="<? echo $thewidth; ?>" HEIGHT="<? echo $theheight; ?>" 
			AUTOPLAY="true" CONTROLLER="true" LOOP="false" PLUGINSPAGE="http://www.apple.com/quicktime/">
		</EMBED>
	</OBJECT>

Open in new window

0
 

Author Comment

by:dougfosterNYC
ID: 22623894
One other comment.  Notice that I add 15 pixels to the height.  This is necessary so you can see the controls at the bottom.  I came to 15 pixels through trial by error. I don't know if there is a "proper" number.
An odd way to deal with the situation, but it seems to work.
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Learn how to create interesting presentations by including videos to keep your audience engaged using Prezi. Select "Insert" from the top menu in your Prezi editor: Select "YouTube Video": Paste the video URL into the prompt: "Select "Insert":…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question