RepeatingVideoDrawing.Rect = new Rect(150, 0, 100, 100) VideoDrawing repeatingVideoDrawing = new VideoDrawing() ![]() RepeatingVideoDrawingPlayer.Clock = mClock MediaPlayer repeatingVideoDrawingPlayer = new MediaPlayer() MediaClock mClock = mTimeline.CreateClock() Create a clock from the MediaTimeline. MTimeline.RepeatBehavior = RepeatBehavior.Forever New MediaTimeline(new UriKind.Relative)) ![]() The following example uses a MediaTimeline with the MediaPlayer and VideoDrawing objects to play a video repeatedly. The MediaTimeline enables you to specify whether the video should repeat. To gain additional timing control over the media, use a MediaTimeline with the MediaPlayer and VideoDrawing objects. ![]() VideoDrawing aVideoDrawing = new VideoDrawing() ĪVideoDrawing.Rect = new Rect(0, 0, 100, 100) The following example uses a VideoDrawing and a MediaPlayer to play a video file once. In your project file, you must instead set the media type to Content and set CopyToOutputDirectory to PreserveNewest or Always. When distributing media with your application, you cannot use a media file as a project resource, like you would an image.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |