Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Streaming video for cross-browsers

Posted on 2008-09-30
4
Medium Priority
?
268 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
  • 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
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…
Suggested Courses

876 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