is there some script i can put in the webpage to make the video viewable to like the person looking at my site IN windows media player or whatever their media player is(but keep the video on the webpage... not in their program window?

does anyone know? i just want to be able to display a video i made on my webpage but i dont want to use youtube kind of thing. i want the persons media player to play it.

ive seen it be done before but i dont know how to make it happen? do any of you?

Dani AI

Generated

Short answer for : you cannot reliably force a visitor’s desktop media player to play "inside" the page across platforms. The old object/embed tricks (shown by ) and Flash embeds (mentioned by and ) are platform- and plugin-dependent and are now deprecated. The modern, robust approach is to serve web-ready files and let the browser play them with the HTML5 <video> element; that keeps playback on the page and works on desktop and mobile.

A minimal, compatible pattern (provide MP4 + WebM, a poster, and a download fallback):

<video controls width="640" poster="poster.jpg">
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  Your browser does not support HTML5 video. <a href="video.mp4">Download the file</a>.
</video>

Encoding and server tips missing from the thread: transcode to H.264 MP4 (widest support) and WebM for newer browsers. Use ffmpeg and add -movflags +faststart so the MP4 plays progressively (the moov atom moves to the start); example:

ffmpeg -i input.mov -c:v libx264 -crf 23 -c:a aac -b:a 128k -movflags +faststart output.mp4

For larger audiences or adaptive bitrate streaming, use HLS or DASH and a JS player (hls.js, video.js, Plyr) rather than Flash. Host video on a CDN or use a video-hosting service if bandwidth is a concern. Troubleshooting: confirm correct MIME types (video/mp4, video/webm), allow range requests on the server (for seeking), avoid Content-Disposition: attachment, and test in Chrome, Firefox, Safari (desktop and mobile). The .avi issues reported by are common: AVI often doesn’t stream well — convert to MP4 with faststart for web delivery.

Recommended Answers

All 19 Replies

could you post a link to where you've seen it before? If the user has the capability to play it in the browser, then it won't want them to open it in a different app. You could have them download it, but that removes the streaming possibilities (aka bad). :D

i dont have a link ive just seen it somewhere a long time ago.

<script type="text/javascript">
<!--//
function shrink(){
 document.getElementById("MediaPlayer1").style.width=384;
 document.getElementById("MediaPlayer1").style.height=300;
}
function enLarge(){
 document.getElementById("MediaPlayer1").style.width=480;
 document.getElementById("MediaPlayer1").style.height=402;
}
 //-->
</script>
<button onclick="enLarge()">large</button>
<button onclick="shrink()">small</button>
<a href="http://www.microsoft.com/windows/windowsmedia/player/download/"><img alt="Get Windows Media Player" src="http://www.microsoft.com/windows/windowsmedia/images/logos/getwm/mp11_88x31_static.gif" width="88" height="31" border="0"></A><br>
<object id="MediaPlayer1" width=384 height=300 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="fileName" value="your FILE"><!-- FULL PATH TO YOUR FILE -->
<param name="showControls" value="true">
<param name="PlayCount" value="0">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="YOUR FILE" name="MediaPlayer1" width=360 height=260 autostart=true><!-- FULL PATH TO YOUR FILE -->
</embed>
</object>

ok thnks but i have a question. will it work for mac users?

ok thnks but i have a question. will it work for mac users?

is there some script i can put in the webpage to make the video viewable to like the person looking at my site IN windows media player...

that part I can do,
and there is a WMP for Mac that downloadable from the included link in the script
BUT
There is no way to stream media into "whatever their media player is" sorry the codes are extremely different
the video formats are extremly different
streaming media in
windows media is asf/wmv format.
quicktime .mov
realmedia .ram

oh ok so the most common would be windows media player?

definitely the easiest to code

Member Avatar for Member #334542

Mr. almostbob, I tried your code and test with an .avi file, It works in iexplore but not in firefox. I mean It is not fetching that file. Any Suggestion

streaming media in
windows media is asf/wmv format

Member Avatar for Member #334542

Yes, you are right, but it works in firefox how?

Member Avatar for Member #334542

sorry working in IE

what about macromedai video embeds?

ok,I thought it would work in firefox too.but,ok thanks for sharing the information.

firefox has video handling issues, ? I dunno
it is not specific code to IE
it works in opera safari IE firefox but only for .asf .wmv files, streaming media files
.avi is not a streaming format, the file is indexed at the end,

i think i will be using embed flash video like adobe flash player code but what is that code?

Easy Web Video software is the best .

is there some script i can put in the webpage to make the video viewable to like the person looking at my site IN windows media player or whatever their media player is(but keep the video on the webpage... not in their program window?

does anyone know? i just want to be able to display a video i made on my webpage but i dont want to use youtube kind of thing. i want the persons media player to play it.

ive seen it be done before but i dont know how to make it happen? do any of you?

To keep the video on the webpage, you can convert your video to the SWF format. SWF video is the Flash Video and it can be embeded into website.

You can use Adobe Flash, for it is currently very popular on the Internet, though it will be replaced by HTML video tag in the next 5-10 years.
You can also upload your video to YouTube. YouTube offers the embed code for the video. What you need to do is just to copy and paste the code to your website. This method is the easiest.

There's a software for this thing. I have the whole suite.
It's by NCH Software.

here's the link for the website:
http://www.nchsoftware.com/software/video.html

Broadcam Video Software.
You can record and link videos and run them on your website.

If you need any more help explaining the software. Please PM me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.