media element

Last post 07-06-2009 12:27 AM by qwe123kids. 5 replies.

Sort Posts:

  • media element

    07-03-2009, 12:31 AM
    • Member
      1 point Member
    • TheRekz
    • Member since 05-29-2009, 12:09 AM
    • Posts 21

    I have a video and I want to divide the video into 9 parts... so therefore I will have an array of media elements, how do I make so that each media element corresponds to a different part in the video, so say I have media element called me1, I want me1 to display the top left part of the video... Is there a way to control this via the source?

  • Re: media element

    07-03-2009, 5:10 AM
    • All-Star
      23,611 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 4,030

    Hi,

    Download ..Window media player9 SDk..and Check the follwing Path on Hardrive..
    There are Other sample Which May help U

    http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=e43cbe59-678a-458a-86a7-ff1716fad02f&displaylang=en


    C:\WMSDK\WMPSDK9\samples\webpages\markers

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: media element

    07-03-2009, 9:09 PM
    • Member
      1 point Member
    • TheRekz
    • Member since 05-29-2009, 12:09 AM
    • Posts 21

    I can post the code that I have here so far, how do you post codes in this site?

  • Re: media element

    07-04-2009, 2:33 PM
    • All-Star
      23,611 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 4,030

    Just Paste The code as U Write The Comment..

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: media element

    07-04-2009, 8:58 PM
    • Member
      1 point Member
    • TheRekz
    • Member since 05-29-2009, 12:09 AM
    • Posts 21
            Canvas[] cI = new Canvas[9];
           
    MediaElement[] me = new MediaElement[9];
       

           
    int blockSizeW = 97;
           
    int blockSizeH = 97;
           

     
     
    void InitBoard()
           
    {
               
    int nx = 0;
               
    for (int ix = 0; ix < 3; ix++)
                   
    for (int iy = 0; iy < 3; iy++)
                   
    {
                        nx
    = (ix * 3) + iy;
                        me
    [nx] = new MediaElement();
                        me
    [nx].Height = 300;
                        me
    [nx].Width = 300;
                        me
    [nx].Stretch = Stretch.UniformToFill;
                       
    RectangleGeometry r = new RectangleGeometry();
                        r
    .Rect = new Rect((ix * blockSizeW), (iy * blockSizeH), blockSizeW, blockSizeH);
                        me
    [nx].Clip = r;
                        me
    [nx].Source = new Uri("Wildlife.wmv", UriKind.Relative);
                        me
    [nx].SetValue(Canvas.TopProperty, Convert.ToDouble(iy * blockSizeH * -1));
                        me
    [nx].SetValue(Canvas.LeftProperty, Convert.ToDouble(ix * blockSizeW * -1));
                     
     
                        cI
    [nx] = new Canvas();
                        cI
    [nx].Width = blockSizeW;
                        cI
    [nx].Height = blockSizeH;
                        cI
    [nx].Children.Add(me[nx]);
                        cI
    [nx].SetValue(Canvas.NameProperty, "C" + nx.ToString());
                        cI
    [nx].MouseLeftButtonDown += new MouseButtonEventHandler(Page_MouseLeftButtonDown);
                       
    if (nx < 8)
                           
    GameContainer.Children.Add(cI[nx]);
                   
    }
     
             

               
           
    }


    and it gives me this error:

    Line: 53
    Error: Unhandled Error in Silverlight 2 Application SlidingBlocks.xap
    Code: 4001    
    Category: MediaError       
    Message: AG_E_NETWORK_ERROR  

    I already tested the video and it is Silverlight compatible

  • Re: media element

    07-06-2009, 12:27 AM
    • All-Star
      23,611 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Posts 4,030

    Seems You are using Silverlight or WPF U may use Timeline In Express Blend With Video Encoder..

    http://msdn.microsoft.com/en-us/magazine/cc721608.aspx

    Sample for time line is Shown in Above  link.

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
Page 1 of 1 (6 items)