Skip to main content

Play Videos in Pure HTML Page (Windows Media Player)


Play Videos in Pure HTML Page (Windows Media Player)

Page1 :  Videoslist.html

<table border="1" cellpadding="10" cellspacing="0" width="90%" align="center" >
<tr>
<td>
<a href="videos.html?vid=videos/1.wmv"><b>Video 1</b></a>

 // Local Video Path
</td>
</tr>
<tr>
<td>
<a href="videos.html?vid=videos/Wildlife.wmv"><b>Video 2</b></a>
</td>
</tr>
<tr>
<td>
<a href="videos.html?vid=http://flightpass.higherplaneproductions.com/g2data/albums/FreeAll/freewmv/JoeNall10_3DH-_W640.wmv"><b>Video 3</b></a

// Server Video Path '

</td>
</tr>
<tr>
<td>
<a href="videos.html"><b>Video 4</b></a>
</td>
</tr>
<tr>
<td>
<a href="videos.html"><b>Video 5</b></a>
</td>
</tr>
<tr>
<td>
<a href="videos.html"><b>Video 6</b></a>
</td>
</tr>
<tr>
<td>
<a href="videos.html"><b>Video 7</b></a>
</td>
</tr>
</table>


Page 2 : Videos.html



Step 1 : Add Script

<script language="javascript" type="text/javascript">
function qs(search_for) {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i = 0; i < parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0 && search_for == parms[i].substring(0, pos)) {
return parms[i].substring(pos + 1); ;
}
}
return "";
}
function Show() {
var path = qs("vid");
var x = "";
x += "<div><object id='mediaplayer' classid='clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701'";
x += " standby='loading microsoft windows media player components...' type='application/x-oleobject'";
x += " width='800px' height='600px'>";
x += " <param name='filename' value='" + path + "' />";
x += " <param name='animationatstart' value='true' />";
x += " <param name='transparentatstart' value='true' />";
x += " <param name='autostart' value='true' />";
x += " <param name='showcontrols' value='true' />";
x += " <param name='ShowStatusBar' value='true' />";
x += " <param name='windowlessvideo' value='true' />";
x += " <embed src='' autostart='true' showcontrols='true' showstatusbar='1' bgcolor='white'";
x += " width='200' height='100'></div>";
document.getElementById('div1').innerHTML = x; // find the div element and assign the video
}
</script>

Step2 : on body tag add the onload event call the Show() funtion in javascript

<body onload="Show()">

step 3 : add div in body tag

<div id="div1"></div>

Video will play when load the Videos.html. 


Comments

  1. Hey There. I found your blog using msn. This is a really well written article.

    I will make sure to bookmark it and return to read more of your useful information.
    Thanks for the post. I will definitely return.

    Review my web blog; atlaslm.com

    ReplyDelete
  2. That is really fascinating, You are a very skilled blogger.
    I have joined your feed and stay up for seeking
    extra of your fantastic post. Additionally, I have shared your site in my social
    networks

    my blog post ... helpful resources

    ReplyDelete
  3. I'm not sure why but this website is loading very slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later on and see if the
    problem still exists.

    Look at my web page; Read the Full Article

    ReplyDelete
  4. Hello all, here every person is sharing these experience, thus it's good to read this webpage, and I used to pay a quick visit this website all the time.

    my web blog ... Quote - duq.ca

    ReplyDelete

Post a Comment

Popular posts from this blog

Authentication ASP.NET_SessionId (Session) along with AuthToken (GUID) cookie

Authentication ASP.NET_SessionID (Session) along with AuthToken (GUID) cookie Introduction ASP.NET Session keeps track of the user by creating a cookie called  ASP.NET_SessionId  in the user browser. This cookie value is checked for every request to ensure that the data being served is specific to that user. In many applications, a Session variable is used to track the logged in user, i.e., if a session variable exists for that user, then the user is logged in, otherwise not. Background Whenever any data is saved into the Session, the  ASP.NET_SessionId  cookie is created in the user’s browser. Even if the user has logged out (means the Session data has been removed by calling the  Session.Abandon() or  Session.RemoveAll()  or  Session.Clear()  method), this  ASP.NET_SessionId  cookie and its value is not deleted from the user browser. This legitimate cookie value can be used by the hijacker to hijack the user session by g...

PNR Status by web Scraping Method (ASP.NET) C#

To Get the PNR Status by web Scraping Method Steps to Execute the Function Step 1 : Add the below method in your Form and Pass the PNR Number arguement public string GetPNRStatus( string sPNR) { string URI = "http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi" ; string Parameters = Uri .EscapeUriString( "lccp_pnrno1=" +sPNR+ "&amp;submitpnr=Get Status" ); System.Net. HttpWebRequest req = ( HttpWebRequest )System.Net. WebRequest .Create(URI); //HTTP POST Headers req.ContentType = "application/x-www-form-urlencoded" ; req.Host = "www.indianrail.gov.in" ; //You can use your own user-agent. req.UserAgent = "Mozilla/5.0 (compatible; MSIE 7.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0) DELL;Venue Pro" ; req.Headers.Add( HttpRequestHeader .AcceptLanguage, "en-us,en;q=0.5" ); req.Headers.Add( HttpRequestHeader .AcceptCharset, "ISO-8859-1,utf-8;q=...
C# HttpClient tutorial C# HttpClient tutorial shows how to create HTTP requests with HttpClient in C#. In the examples, we create simple GET and POST requests. The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web. HttpClient  is a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. C# HttpClient status code HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes: Informational responses (100–199) Successful responses (200–299) Redirects (300–399) Client errors (400–499) Server errors (500–599) Program.cs using System; using System.Net.Http; using System.Threading.Tasks; namespace HttpClientStatus { class Program { static async Task Main(string[] args) { using var client =...