mediaelement

Rolling custom control buttons

戏子无情 提交于 2019-12-11 01:19:58
问题 do you have a reference or tutorial on customizing skins graphics/css for mejs? here's what i've hacked on: i copied the mejs-ted block in the mejs-skins.css file and renamed its elements to mejs-custom . i created a new PNG file similar to the existing control-ted.png and noted the coordinates of each control. with those coordinates i changed the x/y offsets in mejs-custom (i could really use help with that, too). but now how to activate this skin? and can you confirm the technique above is

Playlist for WPF MediaElement app

假装没事ソ 提交于 2019-12-10 18:13:45
问题 I'm learning C# and WPF by building a WMP-type app. The code below runs fine, selecting a movie from the listbox runs it in the media element. The problem I'm having is finding a way to automatically start the next movie after one ends. Thank You. The xml file that provides a list of movies: <?xml version="1.0" encoding="ISO-8859-1"?> Bear c:\movies\Bear.wmv Butterfly c:\movies\Butterfly.wmv Lake c:\movies\Lake.wmv xaml <Window x:Class="WpfAppPlaylistTest.Window1" xmlns="http://schemas

Does a MediaElement only play when it is embedded in XAML code?

*爱你&永不变心* 提交于 2019-12-10 14:44:29
问题 I have a sound player class that doesn't have any visuals at all, and I am trying to use a MediaElement to play my sounds. In all the test projects, in which the MediaElement is embedded in the XAML code, it works fine. However, in my code-only version, is doesn't play anything at all, even though the file has been loaded perfectly (I could see in the Debugger). I am doing the following: public class MySoundPlayer { private MediaElement player = new MediaElement(); public MySoundPlayer() {

How to make a wpf MediaElement play when its Source is a https uri

社会主义新天地 提交于 2019-12-10 13:38:36
问题 In a wpf standalone application (.exe) I have included a MediaElement in the MainWindow <Window x:Class="Media.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Main Window" Height="350" Width="525"> <Grid> <MediaElement x:Name="Player" Stretch="Uniform" LoadedBehavior="Manual" UnloadedBehavior="Stop"/> </Grid> </Window> and from the code behind I set its Source to any https Uri: public partial class

After playing a MediaElement, how can I play it again?

∥☆過路亽.° 提交于 2019-12-10 10:55:36
问题 I have a variable MediaElement variable named TestAudio in my Silverlight app. When I click the button , it plays the audio correctly . But when I click the button again , it does not play the audio. How can I make the MediaElement play a second time? None of the tries below to put position back to 0 worked: private void Button_Click_PlayTest(object sender, RoutedEventArgs e) { //TestAudio.Position = new TimeSpan(0, 0, 0); //TestAudio.Position = TestAudio.Position.Add(new TimeSpan(0, 0, 0));

MediaElement fails after several plays

ぃ、小莉子 提交于 2019-12-10 10:37:39
问题 I have a problem with MediaElement control. I've put six MediaElements on my form, then I start them and change played files by timer. After several times, these elements stop playing. Here is the sample XAML: <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <MediaElement x:Name="element1"

remove createMediaElementSource

こ雲淡風輕ζ 提交于 2019-12-10 08:40:52
问题 I've google all over for this issue, but couldn't find anything. I am in a situation where I need to remove a source = createMediaElementSource so that I can create it again. I am using an audio analyzer which has to load each time you load a specified track using ajax. As soon as you go to another page, and then back, the analyzer is gone. Therefore I need to re-initialize it somehow. My code: var analyserElement = document.getElementById('analyzer'); var canvas, ctx, source, context,

WPF MediaElement stops playing if moved to other screen

蹲街弑〆低调 提交于 2019-12-10 02:16:10
问题 I'm experiencing a very strange problem with MediaElement that seems to be related to multi screen environment: occasionally (I can't replicate the problem each time) MediaElement stops playing when I drag the window it's in from a screen to other. This strange behaivor happens also with a very basic code like: public MainWindow() { InitializeComponent(); } protected override void OnSourceInitialized(EventArgs e) { media.Play(); base.OnSourceInitialized(e); } and <Window x:Class="Test

How to use mouseDown and mouseUp on <button/> [duplicate]

一个人想着一个人 提交于 2019-12-09 19:29:34
问题 This question already has answers here : WPF MouseLeftButtonUp Not Firing (3 answers) Closed 6 years ago . I have a button declared in XAML which has MouseDown and MouseUp attributes that both call a specified method... <Button x:Name="btnBackward" Content="Backward" MouseDown="btnBackward_MouseDown" MouseUp="btnBackward_MouseReleased" Width="50" Height="25" Margin="65,400,377,45"/> However, the method btnBackward_MouseReleased is never called. private void btnBackward_MouseReleased(object

MediaElement web Video doesn't stop buffering

☆樱花仙子☆ 提交于 2019-12-08 15:02:37
问题 I m using MediaElement to play a web video. When I left the page I noticed in the Task Manager that my app was still using 10% of network and didn't drop till it finished downloading video. I tried doing the following but no luck. //open link; mediaElement.Source = welcomeVideoURL; //when I leave the page OnNavigatedFrom() mediaElement.Stop(); mediaElement.ClearValue(MediaElement.SourceProperty); mediaElement.Source = null; Also tried to set the source to a dummy link but still no luck. I