fix: audio src cache change (#8102)

* #8057 Fix audio src change issue caused by reconciliation algorithm and that is why audio file load is not starting.


Co-authored-by: Roman Melnyk <r.melnyk@smartrockstars.com>
This commit is contained in:
Tim Lai
2022-07-19 11:10:28 -07:00
committed by GitHub
parent d0b3ce5ca5
commit 80cffc2544
2 changed files with 26 additions and 26 deletions

View File

@@ -134,7 +134,7 @@ export default class ResponseBody extends React.PureComponent {
// Audio
} else if (/^audio\//i.test(contentType)) {
bodyEl = <pre className="microlight"><audio controls><source src={ url } type={ contentType } /></audio></pre>
bodyEl = <pre className="microlight"><audio controls key={ url }><source src={ url } type={ contentType } /></audio></pre>
} else if (typeof content === "string") {
bodyEl = <HighlightCode downloadable fileName={`${downloadName}.txt`} value={ content } getConfigs={ getConfigs } canCopy />
} else if ( content.size > 0 ) {