title: using dynamic smil file with jw player
body: <p>I'm trying to make a online stream player with JW Player 6.</p>
  
  <p>If I create a smil file with all the quality version of streams and use the code below it works fine:</p>
  
  <pre><code>&lt;script&gt;
      jwplayer("myElement").setup({
          playlist: [{
              sources: [{
                  file: "/player/smil.asp"
          }]
        }],
        type: 'rtmp'
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>smil file:</p>
  
  <pre><code>&lt;smil&gt;
    &lt;head&gt;
      &lt;meta base="rtmp://host/app" /&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;switch&gt;
        &lt;video src="quality1" system-bitrate="720" /&gt;
        &lt;video src="quality2" system-bitrate="360" /&gt;
      &lt;/switch&gt;
    &lt;/body&gt;
  &lt;/smil&gt;
  </code></pre>
  
  <p>I want to create the smil file on the fly based on user's quality selections. (ie: discard bitrates higher than 720)</p>
  
  <p>I used an asp file to create smil file dynamically but it didnt work:</p>
  
  <pre><code>file: "/player/smil.asp"
  </code></pre>
  
  <blockquote>
    <p>the error: <strong><em>Error loading player: No playable sources found</em></strong></p>
  </blockquote>
  
  <p>of course I set header type to <strong><em>application/octet-stream</em></strong> in the asp file but didnt solve the problem. </p>
  
  <p>I also tried saving same asp file with smil extension and than set the asp handler for smil files in IIS setting. it works perfectly when I call in browser, but jw player shows same error.</p>
  
  <p>any recommendation?</p>
  
  <p>thanks.</p>