Solved

Streaming video for cross-browsers

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 …
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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…
Not only does Prezi allow you to create non-linear presentations, it also makes it easy to apply transition animations between your frames. Learn how to apply a fade-in transition to select items and entire frames in this tutorial Select "Edit Path"…

738 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