Silverlight MediaElement Refusing To Play Audio?
Dec 15, 2010
I am having the hardest time figuring this problem out. I have a Silverlight 4 application that loads audio and video files from URLs. The URLs are the same domain as the application is hosted on and it works great for video.The URLs are actually asp.net mvc controllers that are responsible for reading the file from a shared location on and the server and serving back a filestream. The URLs look something like this:http://localhost:31479/CourseMedia?path=omnisandbox1ILMSShare2Demo-Fire+BehaviormediaDisclaim.wma&encrypted=False&id=00000000-0000-0000-0000-000000000000
If I put the URL directly into the browser the file loads and plays in windows media player just fine, and if I use a separate test silverlight project to load the url it also works, but for the life of me I can not get it to work properly in my main project.This is the routine I use to actually do the source setting:
protected void SetPlayerURL(MediaElement player, string url)
{
if (player != null && url.Length > 0)
[code]...
View 1 Replies
Similar Messages:
Aug 23, 2010
how to use Silverlight to play audio from local ASP.NET folders?
View 1 Replies
Mar 7, 2011
I am working on an ASP.NET Web application and I want it to have audio playback functionality. I can do is using directories. For example, using the ASP.NET Audio control like :- , is pretty easy and straight-forward and works accordingly. But, the trouble comes when I'm using a database and the control. I am totally new to data binding in ASP.NET. I don't like using JavaScript, but i am comfortable using it, but I would prefer C# solution (I know beggars can't be choosers).
I have a database containing only one table called tblAudio. This table has two fields only for the title of the audio file (type NVARCHAR(MAX)) and the field for the actual audio (type VAR BINARY(MAX)). I'm using Visual Studio 2010 Professional with SQL Server Express Edition. The table has a single record with the relevant data in their fields.
View 1 Replies
Nov 18, 2010
I am trying to figure out how to persist the playing of a Silverlight MediaElement playing within a Silverlight User Control embedded in an ASP.NET during postback.
The scenario goes:
Have a media player on a site, press play, continue navigating through site while the music continues playing.
What it does right now:
Obviously the object gets loaded anew on each postback or page redirect (even if it's back to the same page IE: default.aspx).
I've seen samples of how to persist the state of a Control on postback and even complex data through cross-page postback. But nothing that covers my specific case.
Other particulars:
Silverlight 2
ASP.NET
C#
My default.aspx:
[code]....
View 1 Replies
Mar 5, 2011
I already have my audio file in database (which is in varbinary(max) data type) and I could retrieve said music as byte(). But the problem is I don't know how to play it..
View 3 Replies
May 24, 2010
how can i add audio play button to play mp3 file
View 3 Replies
Mar 21, 2011
i need to play audio online in asp.net website
My requirement is
users will be able to browser the audio file using file upload control and two button will be displayed 'Play' and 'Stop'.
site should have the capability to play audio file in any format.
View 3 Replies
Aug 25, 2010
I am trying to get this to work for quite some time now. I have an asp.net page in which I am trying to play a wav file. The code in the page load event is as follows:
Response.Clear()
Response.ContentType = "audio/wav"
Response.AppendHeader("Content-Disposition", "inline;filename=" + "temp.wav")
Dim filePath As String = Server.MapPath("/temp.wav")
If Not String.IsNullOrEmpty(filePath) Then
'Here I am converting the file to a byte array,as eventually I'll be creating the wav files on the fly
Dim fileBytes As Byte() = GetFileBytes(filePath)
Response.BinaryWrite(fileBytes)
Response.Flush()
End If
The problem I am having is every time I run this page, the windows media player opens up. I would like the audio to be played using some inbuilt plugin in the browser. Something like, when you click on a voice icon, how the sound pops up without opening any player.
If I have the same content in an ashx handler, would it be better?
I could not use the embed tag because, I shall not be having a physical file on the server, it would be generated on the fly using a response stream.
View 1 Replies
Apr 22, 2012
How can I play an audio on my web page using file path from Sql database?
While I am embedding a player for playing media.
View 1 Replies
Sep 20, 2012
How to play any audio file on browser? I used HTML5's <audio> but it does not support to all extensions. Is it any control for that that any file I can play?
View 1 Replies
Jan 29, 2010
I'm wth Asp.net, c#. How Can I do Audio ,Vedio streaming for a web page?
View 1 Replies
Sep 12, 2010
How could i paly a video & audio file on an asp.net page so that the file is determined on the run time
View 2 Replies
Mar 21, 2011
i need to play audio online in asp.net websiteMy requirement isusers will be able to browser the audio file using file upload control and two button will be displayed 'Play' and 'Stop'.site should have the capability to play audio file in any format.
View 3 Replies
Jul 16, 2012
How to play audio and video files...
View 1 Replies
Sep 20, 2015
I am using ajax and javascript to play sound from specific time till a specific time.
I do change the class from play to pause when user plays it but i am unable to change it back to play when the sound duration stops
<script type="text/javascript">
function aud_play_pause() {
var myAudio = document.getElementById("myTune");
var musicStartTime = 25;
var musicStopTime = 35;
[Code] ....
View 1 Replies
Aug 12, 2010
How to find length of audio file in .net
View 4 Replies
May 7, 2015
i wanna play and download song from database but only path of song is stord in database so how to do this and i don't wanna use id of song i wanna select song by column name (ASP.NET)(SQL server)
View 1 Replies
Aug 6, 2010
How do yo play a video with silverlight?
does Visual Studio come with a video player component build in? or do I need to make a video player?
View 2 Replies
May 18, 2010
AJAX is the big thing...but it seems (to me) that with Silverlight 4 Microsoft has offered a really robust method for creating UI interfaces for the web. I'm wondering - what is the future of AJAX? Do AJAX and Silverlight complement each other or will Silverlight replace AJAX, etc.?
View 4 Replies
Jan 22, 2010
I am having trouble accessing an embedded Silverlight 2 media player in an aspx page from Javascript and was hoping someone might offer some insight on what's going on.
What I want to do is fire a javascript event on the client when a button is pressed to change the Silverlight media player media source and then play the newly selected file.
I found what seemed like a pretty straightforward example on the silverlight.net site that looked like this:
[Code]....
However, when I run it, I get an error "undefinedObject doesn't support this property or method".
I've confirmed that the client-side id I am using is correct, and I have tried using document.GetElementByID in place of $find (which is what I use elsewhere on the site successfully; my javascript kung fu is weak and I'm not precisely sure what the difference
might be) but it still doesn't work. It all seems like it should work as it was presented in the example, but I only get that error.
View 1 Replies
Mar 4, 2010
I am using VSTS 2008 + C# + .Net 3.5 + Silverlight 3.0 + ASP.Net to develop a Silverlight application (a video media player) in browser and the function is simple, just use MediaElement to play a remote video file.The remote server is Windows Server 2008 + IIS 7.0 + IIS Media Bit Rate Throttling Control.Since the request media URL can be discovered (e.g. from traffic sniffer), and I want to know how to prevent from download directly from the Url? i.e. I want end user to use my Silverlight media player application in browser to play the file, prevent them from download to local directly. Any easy and quick solution or reference code/documents?
View 5 Replies
Dec 12, 2010
Adobe Flash or QuickTime..???
I assume Flash is not available via Ipads???
Which method alows the URL of the audio to be hidden when others embed the audio ?
View 4 Replies
Nov 11, 2010
I am trying to play wave file in silverlight using MedeaElement.I forward and backward using the code
me.Position = TimeSpan.FromSeconds(me.Position.TotalSeconds + 2);
me.Position = TimeSpan.FromSeconds(me.Position.TotalSeconds - 2);
while i change the position continuously MediaElement is getting End. For a example i am playing a 5min file i am changing the position some 20 times forward and backward ,the MediaElement is getting End Automatically.
View 1 Replies
Jul 2, 2011
I would like also to know the way to have an embedded video in my site that will not have the play buttons and play again and again. Is there a way to do that??
View 2 Replies
Jan 20, 2010
We have a commerce site we're attempting to get 3D Secure (Verified by VISA/Mastercard Securecode) set up with.
We are using DataCash as our payment provider.
We are seeing the following issue:
Some cards that are enrolled in these schemes are being successfully shown the 3D Secure pages, others are failing, and talking to the issuing banks hasn't helped as they are telling us they haven't seen the transaction.
We are getting messages from servers like "cap.securecode.com" stating:
Your authentication could not be completed because of a system error. If this happens consistently, please contact your CSR".
Or from "www.securesuite.co.uk":
You cannot access this page.
This may be due to one of two reasons:
The FI you are trying to access is deactivated The access to the FI is restricted for specific IP addresses, and your address is not one of them.
Has anyone else seen these errors returned from the verifying banks, and how can I resolve it?
I'm trying to get further details of any pattern to the successes and failures.
View 3 Replies