mediaelement

Data Binding WPF Property to Variable

主宰稳场 提交于 2019-12-02 10:47:34
I have a project in WPF 4 and VB.net 2010. I want to bind the volume property of a mediaelement to a variable in another module. Mind you, the variable is in the correct data type, so no conversion is necessary. How do I do this? First, make sure that your code behind implements INotifyPropertyChanged. Example here: http://www.codekeep.net/snippets/4c7ed2e5-7e3b-40b4-b976-d54b54d9bf5b.aspx All that is is a way to notify the UI that value for the Volume has changed and it needs to grab the new value on the binding. The second thing is you'll need to somehow access the variable from the other

MediaElement Speedratio not linear

邮差的信 提交于 2019-12-02 04:20:23
问题 I have a MediaElement which I use to display movies. I would like to have precise control of the speed at which these movies are played. For this purpose I used the SpeedRatio property on MediaElement . The problem I have is that it does not seem to be linear. At speedratio 2 it plays at almost 4x speed (ie 40 seconds play in 10 seconds) and speedratio 0.5 plays at almost 0.25x speed (ie 10 seconds play in 40 seconds). This is an approximation, can anyone clarify? The documentation does not

MediaElement Speedratio not linear

最后都变了- 提交于 2019-12-02 00:54:46
I have a MediaElement which I use to display movies. I would like to have precise control of the speed at which these movies are played. For this purpose I used the SpeedRatio property on MediaElement . The problem I have is that it does not seem to be linear. At speedratio 2 it plays at almost 4x speed (ie 40 seconds play in 10 seconds) and speedratio 0.5 plays at almost 0.25x speed (ie 10 seconds play in 40 seconds). This is an approximation, can anyone clarify? The documentation does not explain. Also when playing at a SpeedRatio other than 1x the movie seems to jitter. I have added a label

playing two videos simultaneously

左心房为你撑大大i 提交于 2019-12-01 20:07:54
问题 I need to play cyclically two videos (each is 15 seconds length) simultaneously in my app. And time by time I need to change opacity of one video (in DoubleAnimation), to let it appear above another video. Playing two videos need for syncronization purposes. I tried to use MediaElements to play video, but I can not get them to play the video simultaneously. I think it's impossible. Am I right? Also I tried to divide my videos into 450 frames (30 frames per second) and use

playing two videos simultaneously

我只是一个虾纸丫 提交于 2019-12-01 18:53:28
I need to play cyclically two videos (each is 15 seconds length) simultaneously in my app. And time by time I need to change opacity of one video (in DoubleAnimation), to let it appear above another video. Playing two videos need for syncronization purposes. I tried to use MediaElements to play video, but I can not get them to play the video simultaneously. I think it's impossible. Am I right? Also I tried to divide my videos into 450 frames (30 frames per second) and use ObjectAnimationUsingKeyFrames, (example: http://compiledexperience.com/windows-phone/tutorials/candle ), but this way uses

How to reuse BackgroundAudioPlayer after Close method called

Deadly 提交于 2019-12-01 13:21:25
I’m using MediaElement for playing videos and BackgroundAudioPlayer for playing audio. Here is a case. I’m playing remote audio via BackgroundAudioPlayer. Then I want to play video and before MediaElement begins playing video I’m calling BackgroundAudioPlayer.Close as suggested in BackgroundAudioPlayer best practices. MediaElement and the BackgroundAudioPlayer Care must be taken when mixing BackgroundAudioPlayer and MediaElement for audio playback. 1. Close() must be called before switching to MediaElement playback. 2. There is only one media queue. Your application cannot pause background

How to know which video formats my WPF application can play?

邮差的信 提交于 2019-12-01 06:32:52
I have a small application that allows the playback of videos. First off, I do not restrict the user to select particular types of file. What I want to do is make sure I can play the file the user selected. How do I get a list of available codecs, or query the playback qualities of the WPF application (the MediaElement control)? The alternative proposed is to convert any selected input file to a uniform format (for example, MPEG) before it's played, but that seems to be more difficult. Singleton This link might help you: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/88b41d80-3e8c

c# WPF how to repeat MediaElement playback from mediaended event handler without declaring new source?

痴心易碎 提交于 2019-11-30 20:20:15
im playing a video in WPF.i want it to loop so what i did is when the mediaended event fires, i play back my video. so this will get me a loop. prob is why do u i have to create new source again? why cant i just call 'play'? i dont want to do it in XAML as for some reason. have a look at my code snippet: string startPath System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); public Window1() { InitializeComponent(); media.Source = new Uri(startPath + @"playlist.wpl"); media.play(); } private void Media_Ended(object sender, EventArgs e) { media.Source = new Uri

How to call a function on video end ? (HTML5 and mediaelementjs)

烂漫一生 提交于 2019-11-30 20:17:22
i am using mediaelementjs for playing video on my website but i need to call some function at the END/pause of video.So please tell me how an i do this? Thanks in advance You need to create a new EventListener for the ended and pause events. Example: YourMediaElement.addEventListener('ended', function(){ //Your Code goes here }); Update: This method should be applied on the success handler of creating the element, as is shown in the example on the bottom of the page at MediaElementJS.com success: function (YourMediaElement, domObject) { // add event listener YourMediaElement.addEventListener(

c# WPF how to repeat MediaElement playback from mediaended event handler without declaring new source?

时光怂恿深爱的人放手 提交于 2019-11-30 16:57:19
问题 im playing a video in WPF.i want it to loop so what i did is when the mediaended event fires, i play back my video. so this will get me a loop. prob is why do u i have to create new source again? why cant i just call 'play'? i dont want to do it in XAML as for some reason. have a look at my code snippet: string startPath System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); public Window1() { InitializeComponent(); media.Source = new Uri(startPath + @"playlist.wpl"