title: How can I host and embed a video in an MVC application on Azure?
body: <p>I have created a basic application and uploaded to Azure.  I want to embed videos, so that a user can make a selection from a list and see a video for each one; like choosing a film and watching it's trailer, for example.</p>
  
  <p>I've created two folders in my MVC solution: '/Posters' contains .jpg files to act as background for each video, and '/Videos' contains .mp4 files as the source for each video.  </p>
  
  <p>The .cshtml snippet is here:</p>
  
  <pre><code> &lt;video controls="controls" poster="@Model.PosterPath" width="640" height="360"&gt;
      &lt;source src="@Model.VideoPath" type="video/mp4" /&gt;
  
          &lt;object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="640" height="360"&gt;
              &lt;param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /&gt;
              &lt;param name="allowFullScreen" value="true" /&gt;
              &lt;param name="wmode" value="transparent" /&gt;
              &lt;param name="flashVars" value="config={'playlist':['@Model.PosterUrl',{'url':'@Model.VideoUrl','autoPlay':false}]}" /&gt;
              &lt;img alt="@Model.AltText" src="@Model.PosterPath" width="640" height="360" title="No video playback capabilities" /&gt;
          &lt;/object&gt;
  &lt;/video&gt;
  </code></pre>
  
  <p>After publishing, the video element is there, and the poster displays correctly, but when I click the play button, I get a "stream not found" error.</p>
  
  <p>I'm using a relative path for the VideoPath and PosterPath values, as follows:</p>
  
  <pre><code>../../Videos/myvideo.mp4 
  </code></pre>
  
  <p>The VideoUrl and PosterUrl values need to be an absolute path, with the ':' and '/' values replaced, so 'http://mywebsite.azurewebsites.net/Videos/myvideo.mp4' is shown as follows:</p>
  
  <pre><code>http%3A%2F%2Fmywebsite.azurewebsites.net%2FVideos%2Fmyvideo.mp4
  </code></pre>
  
  <p>There is obviously the chance that the paths (relative AND absolute) are incorrect; but since the Posters display correctly, I am left wondering if there is another reason.</p>
  
  <p>Is there any way for me to test that the videos have been published correctly?  Apologies if this is a very basic question, it's my first Azure application :-)</p>
  
  <p>Thanks</p>