title: Angular2: restart the html audio tag on real time
body: <p>I have a component which play an mp3 file, and it gets the played file name from its parent. Here is the code:</p>
  
  <pre><code>export class PlayComponent implements OnChanges  {
  
        @Input() fileToPlay:string;
  
        ngOnChanges(arg){
  
           console.log(arg.fileToPlay);
        }
      }
  </code></pre>
  
  <p>and the html is:</p>
  
  <pre><code>&lt;div *ngIf="fileToPlay!=''"&gt;
      &lt;audio  controls autoplay class="playa" di="audio"&gt;
        &lt;source [src]="fileToPlay" type="audio/mpeg"&gt;
        Your browser does not support the audio element.
      &lt;/audio&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It works fine for first play. The value of <code>fileToPlay</code> may change and i want to play the new file on real time, but <strong>it always play the first file name.</strong></p>
  
  <p>How can i fix it?</p>