Solved

Streaming video for cross-browsers

Posted on 2008-09-30
4
258 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

635 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