Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. "Embed" an external video clip

"Embed" an external video clip

Scheduled Pinned Locked Moved WPF
questionlearning
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    McCombi
    wrote on last edited by
    #1

    Hi all, I am trying to show a video clip after the user clicks on a thumbnail image. I tried 3 ways already, without joy :(( 1) I included the video as a resource in the project – but it took too long to load, obviously :( 2) I tried the following line, which opens the video nicely :thumbsup:, but in another browser window :thumbsdown: System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://youtu.be/code\_for\_video"), "", "toolbar=1,menubar=1,resizable=1,scrollbars=1,top=0,left=0"); 3) I tried the following line, which doesn’t work :~ htmlHost.SourceUri = new Uri("http://youtu.be/code\_for\_video"); I am doing something wrong? Am I missing something essential? Should I try something else? I want to show the video in something like an iframe, but I can’t get anything worthwhile after numerous Google searches. I am using Silverlight 3, and Microsoft Visual Web Developer 2010 Express. Any advise, guidance and suggestions are welcome.:cool: Thanks.

    N M 2 Replies Last reply
    0
    • M McCombi

      Hi all, I am trying to show a video clip after the user clicks on a thumbnail image. I tried 3 ways already, without joy :(( 1) I included the video as a resource in the project – but it took too long to load, obviously :( 2) I tried the following line, which opens the video nicely :thumbsup:, but in another browser window :thumbsdown: System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://youtu.be/code\_for\_video"), "", "toolbar=1,menubar=1,resizable=1,scrollbars=1,top=0,left=0"); 3) I tried the following line, which doesn’t work :~ htmlHost.SourceUri = new Uri("http://youtu.be/code\_for\_video"); I am doing something wrong? Am I missing something essential? Should I try something else? I want to show the video in something like an iframe, but I can’t get anything worthwhile after numerous Google searches. I am using Silverlight 3, and Microsoft Visual Web Developer 2010 Express. Any advise, guidance and suggestions are welcome.:cool: Thanks.

      N Offline
      N Offline
      Navin Pandit
      wrote on last edited by
      #2

      Try this: http://www.c-sharpcorner.com/uploadfile/scottlysle/csharpwebvideo04212007133218pm/csharpwebvideo.aspx

      M 1 Reply Last reply
      0
      • N Navin Pandit

        Try this: http://www.c-sharpcorner.com/uploadfile/scottlysle/csharpwebvideo04212007133218pm/csharpwebvideo.aspx

        M Offline
        M Offline
        McCombi
        wrote on last edited by
        #3

        Hey Navin, Thanks for the prompt reply :cool: I do, however, want to embed the video into my SILVERLIGHT app, and not on the apsx page.

        N 1 Reply Last reply
        0
        • M McCombi

          Hey Navin, Thanks for the prompt reply :cool: I do, however, want to embed the video into my SILVERLIGHT app, and not on the apsx page.

          N Offline
          N Offline
          Navin Pandit
          wrote on last edited by
          #4

          Hi Mc, Why you are not trying for YoueTube API? Bcz. if u want to show youtube video, then it will embed that video frame into your page. If you are using silverlight control, then just pass the video url to your media control. Hope it work. Best of luck!

          1 Reply Last reply
          0
          • M McCombi

            Hi all, I am trying to show a video clip after the user clicks on a thumbnail image. I tried 3 ways already, without joy :(( 1) I included the video as a resource in the project – but it took too long to load, obviously :( 2) I tried the following line, which opens the video nicely :thumbsup:, but in another browser window :thumbsdown: System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://youtu.be/code\_for\_video"), "", "toolbar=1,menubar=1,resizable=1,scrollbars=1,top=0,left=0"); 3) I tried the following line, which doesn’t work :~ htmlHost.SourceUri = new Uri("http://youtu.be/code\_for\_video"); I am doing something wrong? Am I missing something essential? Should I try something else? I want to show the video in something like an iframe, but I can’t get anything worthwhile after numerous Google searches. I am using Silverlight 3, and Microsoft Visual Web Developer 2010 Express. Any advise, guidance and suggestions are welcome.:cool: Thanks.

            M Offline
            M Offline
            McCombi
            wrote on last edited by
            #5

            I have even tried the VideoBrush today, with no success :( See code below. On page Player:

            …

            …
            …

            Then from the xaml page where the user clicks on the image to see video clip:

            …
            player.mediaPlayer.Source = new Uri("http://youtu.be/code\_of\_video");
            player.rect.Fill = player.brush;
            …

            Please help me! :cool:

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups