2) your mime type for wmv files is wrong: Try: video/x-ms-wmv
3) The file won't exist in the location you put it in because C:\... isn't a valid location for the file. So, if you create a TestApp that would be http://localhost/TestApp or C:\Inetpub\wwwroot\TestApp. If you drop your video in that diectory (root of application
you created) then use: src="xa0002.wmv" it will work
Hope this helps
Please click 'Mark as Answer' if my reply helped
Homepage | YouTube Channel | Post code, not links
Marked as answer by Angie xu - MSFT on Dec 11, 2012 11:10 PM
Ahmed MEZRI
0 Points
1 Post
a simple web form displaying nothing
Dec 05, 2012 10:01 AM|LINK
aspx file : I have a simple web form that contains only a short JavaScript code withitn its head tag and and a simple onload method in the body tag.
Besides, the code behind file is empty.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DicomSequencePlayer_ASP.aspx.cs" Inherits="ASPNET.DICOM.DicomSequencePlayer_ASP" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>HTML5 video</title> <script type="text/javascript"> function checkPlay() { var myVideo = document.getElementById("myVid"); var ytStr = '<iframe width="500" height="500" src="C:\XA0002.wmv" frameborder="0" allowfullscreen></iframe>'; try { var canPlay = document.getElementsByTagName('video')[0].canPlayType("video/wmv"); if ((canPlay == "no") || (canPlay == "")) { myVideo.innerHTML = ytStr; } new MediaElement(v, { success: function (media) { media.play(); } }); } catch (err) { myVideo.innerHTML = ytStr; } } </script> </head> <body onload="checkPlay()"> <div id="myVid"/> </body> </html>Problem: when i run it absolutely displaying nothing (a white page)
would you help me please. Thank you so much.
crouchie2004
Member
497 Points
306 Posts
Re: a simple web form displaying nothing
Dec 05, 2012 09:21 PM|LINK
Hi,
1) If you're using Firefox, you will be required to install the missing plugin (http://interoplabs.blob.core.windows.net/wmpff/wmpfirefoxplugin.exe)
2) your mime type for wmv files is wrong: Try: video/x-ms-wmv
3) The file won't exist in the location you put it in because C:\... isn't a valid location for the file. So, if you create a TestApp that would be http://localhost/TestApp or C:\Inetpub\wwwroot\TestApp. If you drop your video in that diectory (root of application you created) then use: src="xa0002.wmv" it will work
Hope this helps
Homepage | YouTube Channel | Post code,
not links