mediaelement

Global MediaElement that continues playing after navigating to other page

旧时模样 提交于 2019-11-29 10:22:42
问题 I am using a MediaElement to play music in my metro app. I want the Music keeps playing even if I navigate to another Page. In the following Thread that question was asked also: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/241ba3b4-3e2a-4f9b-a704-87c7b1be7988/ I did what JimMan suggested 1) In App.xaml.cs Changed the control template of the root frame to include the MediaElement var rootFrame = new Frame(); rootFrame.Style = Resources["RootFrameStyle"] as Style;

YouTube on Windows Phone with MediaElement

こ雲淡風輕ζ 提交于 2019-11-29 07:22:32
This blog post suggests that it might be possible to play YouTube videos with the Silverlight MediaEelement directly. <MediaElement HorizontalAlignment="Left" VerticalAlignment="Top" Source="http://www.youtube.com/get_video? video_id=8yuIw_0ejLs&t=vjVQa1PpcFPrX3tFoahhu4DbniDIqTLkwybdm8xuCt8%3D&fmt=22"/> I was wondering if this holds true for the Windows Phone 7. I have an application that is based on playing videos hosted on YouTube, and it would be nice to be able to have more control over the video experience other than just launching the browser with the YouTube video URL. Unless you have a

How to set WPF window position in secondary display

≯℡__Kan透↙ 提交于 2019-11-29 01:20:40
I have two displays. I want to make a media player and I want to play video full screen on my secondary display. So I’m trying to make a media player using WPF Here is the code so far I wrote Screen[] _screens = Screen.AllScreens; System.Drawing.Rectangle ractagle = _screens[1].Bounds; //player is my window player.WindowState = WindowState.Maximized; player.WindowStyle = WindowStyle.None; player.Left = ractagle.X; player.Top = ractagle.Y; // MediaControl is an media elements MediaControl.Height = ractagle.Height; MediaControl.Width = ractagle.Width; But somehow it’s just playing on my first

Why does WPF MediaElement not work on secondary monitor?

♀尐吖头ヾ 提交于 2019-11-28 23:13:42
My application uses the WPF MediaElement to play video (MOV files). This works well when playing on the Primary monitor but freezes when the window is moved to the secondary monitor. I have tried the following without success: Starting the application on the secondary monitor Swapping the primary & secondary monitors (problem transfers to the new secondary monitor) When the application window spans both monitors it works correctly but as soon as it is entirely within the secondary monitor the video freezes. Once in this state, moving the application back to the primary monitor doesn't help

Media element Rewind

巧了我就是萌 提交于 2019-11-28 11:15:15
问题 In my application, I play a video file using the MediaElement control, and I need to have fast forward and rewind options. For fast forward, I increased the SpeedRatio , but how can I implement fast rewind? I want to play the video in reverse (in appropriate speed ratio). 回答1: You could set the MediaElement.ScrubbingEnabled property to true, and pause the MediaElement, and then periodically change its MediaElement.Position property backwards to mimic the rewinding behaviour. 来源: https:/

How to Play Transparent background avi file in media element?

眉间皱痕 提交于 2019-11-28 10:55:55
问题 I have a video with transparent background in .avi format (Made from Adobe After Effects), but the transparent background appears black in mediaelement. Media Player has no background property also. What should i use so that this media element plays the file and when placed on an image takes that image as its background. (No i cannot embed that image in the avi file as my image keeps changing). *If my approach is wrong please let me know. 回答1: I'm afraid using the normal wpf media player this

Make MediaElement support more video codecs

久未见 提交于 2019-11-28 09:22:11
Is there a way to make MediaElement support more video codecs like mkv , flv , mov etc.? If not, is there any other control that supports more video codecs? Have you seen the Player Framework ? It's an open source component supporting Windows 8, part of the Microsoft Media Platform, and developed by Microsoft. It's an alternative to the standard MediaElement control, and provides a plug-in mechanism. I'm not sure whether you can support extra codecs through this mechanism though. Other than that, you can also extend the media platform (the extension has to be written in C++ though) as shown in

displaying subtitles for a video in a WPF MediaElement

那年仲夏 提交于 2019-11-28 06:41:07
问题 I'm working on a WPF application that displays video clips as part of the workflow. I'm doing this by using MediaElement to play locally hosted (not streamed) AVI files. Works great. However, I was just handed a new requirement to allow the display of subtitles while the clip is playing. I have no idea of the best way to go about this. I'm vaguely aware that WMP has the ability to display separate subtitle files when a clip is playing, but I don't know if WPF supports this? Can I do this

YouTube on Windows Phone with MediaElement

旧城冷巷雨未停 提交于 2019-11-28 01:07:43
问题 This blog post suggests that it might be possible to play YouTube videos with the Silverlight MediaEelement directly. <MediaElement HorizontalAlignment="Left" VerticalAlignment="Top" Source="http://www.youtube.com/get_video? video_id=8yuIw_0ejLs&t=vjVQa1PpcFPrX3tFoahhu4DbniDIqTLkwybdm8xuCt8%3D&fmt=22"/> I was wondering if this holds true for the Windows Phone 7. I have an application that is based on playing videos hosted on YouTube, and it would be nice to be able to have more control over

Show first frame of video in WPF MediaElement

蹲街弑〆低调 提交于 2019-11-28 00:44:15
I have a WPF-application with a MediaElement which I use to run a video. I don't want the video to autoplay when loaded, so I set the LoadedBehavior to Manual. <MediaElement LoadedBehavior="Manual" Source="foo.wmv" MediaOpened="videoElement_MediaOpened" /> However; I want the element to show the first frame of the video when loaded. Is there any magic way of doing this? You also need ScrubbingEnabled="True" Then set an event on Load Loaded="Video1_Loaded" In the Video1_Load method add the following: Video1.Play(); Video1.Pause(); None of the video content is rendered before the play method is