Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Advances in audio technology continue to trickle down to our development platforms. A useful feature in Silverlight is known as TrickPlay. When you play a video at an accelerated place, TrickPlay reduces the voice distortion that you might expect. This happens automatically when the playback speed is between 1.0 and 2.0. TrickPlay also works when slowing down the Playback speed. Playback rates between 0.5 and 1.0 are normalized too. For this demonstration, I am using Visual Studio and a project called ChangingVideoSpeed. I'll start by looking at the SpeedPlayer.
The MediaElement implementation in SpeedPlayer is similar to the one shown in the previous movie. The difference is that this player has speed control. Let me show you the code. In the constructor of SpeedPlayer, I am creating a list of doubles. These are going to be the speeds for the player. I then take that list and assign it the ItemSource of the speedCombo box. I also wire up an EventHandler. When this SelectionChanged event fires, I grab the selected item, let's say 1.5, and assign it to this variable, and then I take that 1.5 value and I assign it to the PlaybackRate of the MediaPlayer.
Let's see what this sounds like. Press F5 to run the application. I will choose 2.0 for the speed, and then I'll start the video. (video playing) (garbled speech) Now I want to pick a speed that's greater than 2.0 that is no longer any audio, but is still running at 12 times a normal speed.
This also happens when I slow it down to 0.2. Having the ability to offer multispeed playback is essential to building flexible video players with Silverlight. The addition of TrickPlay makes video playback even better.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 97076 Viewers
61 Video lessons · 84395 Viewers
71 Video lessons · 68607 Viewers
56 Video lessons · 101093 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.