Usuário com melhor resposta
Em qual Evento no MediaElement pode-se colocar uma msg para sêr exibida dentro do player tipo Aguarde Carregando...

Pergunta
-
Olá pessoal gostaria de saber em qual evento no MediaElement, enquanto o video não carrega ou bufferiza poderia se colocar uma msg para sêr exibida na tela de video do MediaElement tipo "Aguarde Carregando Video..." até que o mesmo fosse carregado
Estou programando o player em Silverlight 3.0, CSharp Asp.Net e utilizando o VS2008
Fico no aguardo e desde já agradeço
LADEFterça-feira, 1 de setembro de 2009 00:41
Respostas
-
Eu monitoraria o evento CurrentStateChanged e tiraria a mensagem da tela quando a propriedade CurrentState for diferente de Playing ou Stopped. Essa propriedade pode ter os seguintes valores:// Summary:// The System.Windows.Controls.MediaElement contains no media. The System.Windows.Controls.MediaElement// displays a transparent frame.Closed = 0,//// Summary:// The System.Windows.Controls.MediaElement is validating and attempting to// open the Uniform Resource Identifier (URI) specified by its System.Windows.Controls.MediaElement.Source// property. While in this state, the System.Windows.Controls.MediaElement queues// any System.Windows.Controls.MediaElement.Play(), System.Windows.Controls.MediaElement.Pause(),// or System.Windows.Controls.MediaElement.Stop() commands it receives and processes// them if the media is successfully opened.Opening = 1,//// Summary:// The System.Windows.Controls.MediaElement is loading the media for playback.// Its System.Windows.Controls.MediaElement.Position does not advance during// this state. If the System.Windows.Controls.MediaElement was already playing// video, it continues to display the last displayed frame.Buffering = 2,//// Summary:// The System.Windows.Controls.MediaElement is playing the media specified by// its source property. Its System.Windows.Controls.MediaElement.Position advances// forward.Playing = 3,//// Summary:// The System.Windows.Controls.MediaElement does not advance its System.Windows.Controls.MediaElement.Position.// If the System.Windows.Controls.MediaElement was playing video, it continues// to display the current frame.Paused = 4,//// Summary:// The System.Windows.Controls.MediaElement contains media but is not playing// or paused. Its System.Windows.Controls.MediaElement.Position is 0 and does// not advance. If the loaded media is video, the System.Windows.Controls.MediaElement// displays the first frame.Stopped = 5,//// Summary:// The System.Windows.Controls.MediaElement is in the process of ensuring that// proper individualization components (only applicable when playing DRM protected// content) are installed on the user's computer. See Digital Rights Management// (DRM) for more information.Individualizing = 6,//// Summary:// The System.Windows.Controls.MediaElement is acquiring a license required// to play DRM protected content. Once System.Windows.Media.LicenseAcquirer.OnAcquireLicense(System.IO.Stream,System.Uri)// has been called, the System.Windows.Controls.MediaElement will remain in// this state until System.Windows.Media.LicenseAcquirer.SetLicenseResponse(System.IO.Stream)// has been called.AcquiringLicense = 7,Atenciosamente,
Kelps Leite de Sousa
blog: http://kelps-sousa.blogspot.com
twitter : http://twitter.com/kelps
Não se esqueça de "marcar como resposta" o ítem que lhe ajudou.- Marcado como Resposta Daniel Ferreira terça-feira, 13 de julho de 2010 23:33
sexta-feira, 2 de outubro de 2009 02:04 -
Você pode usar os eventos BufferingProgressChanged para saber o progresso do buffer do video e/ou o evento DownloadProgressChanged para saber o progresso do download do vídeo.
- Marcado como Resposta Daniel Ferreira terça-feira, 13 de julho de 2010 23:33
segunda-feira, 9 de novembro de 2009 16:31
Todas as Respostas
-
Eu monitoraria o evento CurrentStateChanged e tiraria a mensagem da tela quando a propriedade CurrentState for diferente de Playing ou Stopped. Essa propriedade pode ter os seguintes valores:// Summary:// The System.Windows.Controls.MediaElement contains no media. The System.Windows.Controls.MediaElement// displays a transparent frame.Closed = 0,//// Summary:// The System.Windows.Controls.MediaElement is validating and attempting to// open the Uniform Resource Identifier (URI) specified by its System.Windows.Controls.MediaElement.Source// property. While in this state, the System.Windows.Controls.MediaElement queues// any System.Windows.Controls.MediaElement.Play(), System.Windows.Controls.MediaElement.Pause(),// or System.Windows.Controls.MediaElement.Stop() commands it receives and processes// them if the media is successfully opened.Opening = 1,//// Summary:// The System.Windows.Controls.MediaElement is loading the media for playback.// Its System.Windows.Controls.MediaElement.Position does not advance during// this state. If the System.Windows.Controls.MediaElement was already playing// video, it continues to display the last displayed frame.Buffering = 2,//// Summary:// The System.Windows.Controls.MediaElement is playing the media specified by// its source property. Its System.Windows.Controls.MediaElement.Position advances// forward.Playing = 3,//// Summary:// The System.Windows.Controls.MediaElement does not advance its System.Windows.Controls.MediaElement.Position.// If the System.Windows.Controls.MediaElement was playing video, it continues// to display the current frame.Paused = 4,//// Summary:// The System.Windows.Controls.MediaElement contains media but is not playing// or paused. Its System.Windows.Controls.MediaElement.Position is 0 and does// not advance. If the loaded media is video, the System.Windows.Controls.MediaElement// displays the first frame.Stopped = 5,//// Summary:// The System.Windows.Controls.MediaElement is in the process of ensuring that// proper individualization components (only applicable when playing DRM protected// content) are installed on the user's computer. See Digital Rights Management// (DRM) for more information.Individualizing = 6,//// Summary:// The System.Windows.Controls.MediaElement is acquiring a license required// to play DRM protected content. Once System.Windows.Media.LicenseAcquirer.OnAcquireLicense(System.IO.Stream,System.Uri)// has been called, the System.Windows.Controls.MediaElement will remain in// this state until System.Windows.Media.LicenseAcquirer.SetLicenseResponse(System.IO.Stream)// has been called.AcquiringLicense = 7,Atenciosamente,
Kelps Leite de Sousa
blog: http://kelps-sousa.blogspot.com
twitter : http://twitter.com/kelps
Não se esqueça de "marcar como resposta" o ítem que lhe ajudou.- Marcado como Resposta Daniel Ferreira terça-feira, 13 de julho de 2010 23:33
sexta-feira, 2 de outubro de 2009 02:04 -
Bem em meu player eu fiz uma animação e coloquei esta animação dentro BufferingProgressChanged , ou seja, quando faz o buffer roda a animação, tipo os player que já estamos acostumado ver por ai. YOUTUBE.
de uma olhada:
http://www.dowhile.com.br
e veja se seria isso ai.. que tu quer te dou umas dicas
Muito útil
abraços
Flavia Moreira
Não se esqueça de "marcar como resposta" se o ítem te ajudou.- Sugerido como Resposta Teruhiko segunda-feira, 9 de novembro de 2009 20:42
sexta-feira, 6 de novembro de 2009 23:11 -
Você pode usar os eventos BufferingProgressChanged para saber o progresso do buffer do video e/ou o evento DownloadProgressChanged para saber o progresso do download do vídeo.
- Marcado como Resposta Daniel Ferreira terça-feira, 13 de julho de 2010 23:33
segunda-feira, 9 de novembro de 2009 16:31 -
Flavia mas qual video ou artigo é eu entrei lá e não achei...fico no aguardo e desde já agradeço
E Kelps como seria isto que vc nos passou em codigo teria como me passar um exemplo
Eu monitoraria o evento CurrentStateChanged e tiraria a mensagem da tela quando a propriedade CurrentState for diferente de Playing ou Stopped. Essa propriedade pode ter os seguintes valores:// Summary:// The System.Windows.Controls.MediaElement contains no media. The System.Windows.Controls.MediaElement// displays a transparent frame.Closed = 0,//// Summary:// The System.Windows.Controls.MediaElement is validating and attempting to// open the Uniform Resource Identifier (URI) specified by its System.Windows.Controls.MediaElement.Source// property. While in this state, the System.Windows.Controls.MediaElement queues// any System.Windows.Controls.MediaElement.Play(), System.Windows.Controls.MediaElement.Pause(),// or System.Windows.Controls.MediaElement.Stop() commands it receives and processes// them if the media is successfully opened.Opening = 1,//// Summary:// The System.Windows.Controls.MediaElement is loading the media for playback.// Its System.Windows.Controls.MediaElement.Position does not advance during// this state. If the System.Windows.Controls.MediaElement was already playing// video, it continues to display the last displayed frame.Buffering = 2,//// Summary:// The System.Windows.Controls.MediaElement is playing the media specified by// its source property. Its System.Windows.Controls.MediaElement.Position advances// forward.Playing = 3,//// Summary:// The System.Windows.Controls.MediaElement does not advance its System.Windows.Controls.MediaElement.Position.// If the System.Windows.Controls.MediaElement was playing video, it continues// to display the current frame.Paused = 4,//// Summary:// The System.Windows.Controls.MediaElement contains media but is not playing// or paused. Its System.Windows.Controls.MediaElement.Position is 0 and does// not advance. If the loaded media is video, the System.Windows.Controls.MediaElement// displays the first frame.Stopped = 5,//// Summary:// The System.Windows.Controls.MediaElement is in the process of ensuring that// proper individualization components (only applicable when playing DRM protected// content) are installed on the user's computer. See Digital Rights Management// (DRM) for more information.Individualizing = 6,//// Summary:// The System.Windows.Controls.MediaElement is acquiring a license required// to play DRM protected content. Once System.Windows.Media.LicenseAcquirer.OnAcquireLicense(System.IO.Stream,System.Uri)// has been called, the System.Windows.Controls.MediaElement will remain in// this state until System.Windows.Media.LicenseAcquirer.SetLicenseResponse(System.IO.Stream)// has been called.AcquiringLicense = 7,
Fico no aguardo e desde já agradeço
LADEFquinta-feira, 26 de novembro de 2009 23:54