C# School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C# Expert!

Join 307,218 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,622 people online right now. Registration is fast and FREE... Join Now!




play video from website using Microsoft.DirectX.AudioVideoPlayback

 

play video from website using Microsoft.DirectX.AudioVideoPlayback

asadkhanno1

9 Sep, 2009 - 12:55 PM
Post #1

New D.I.C Head
*

Joined: 16 Sep, 2008
Posts: 13

hello i ve tried play video from hard disk work fine but i want to play video from web video (.wmv) plzz help me whats the mistake in code ii bet from my freind that i do this plzz help its urgent
code is:

CODE

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Web;
using System.Windows.Forms;
using Microsoft.DirectX.AudioVideoPlayback;

namespace directxvideoplayer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
int width = panel1.Width;
int height = panel1.Height;
System.Uri u = new Uri("http://www.livevideo.com/video/09C9EEDA03EF4B55A6D16E2F7CF0B638/prezentacja-zespolu-f1-honda-t.aspx");

Video video;
video= Video.FromUrl(u);
video.Owner = panel1;
video.Stop();
video.Play();

// resize the video to the size original size of the panel

panel1.Size = new Size(width, height);
}
}
}


Admin Edit: Please use code tags when posting your code. Code tags are used like so => code.gif

Thanks,
PsychoCoder smile.gif

User is offlineProfile CardPM
+Quote Post



Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 10:18PM

Live C# Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month