Skip to content

Commit

Permalink
improvement: update detail view
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglun committed Apr 10, 2024
1 parent 44dc87d commit 9548b45
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/ArticleView/adpater/Podcast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ export function PodcastAdapter(props: any) {
function renderMediaBox(media: any) {
const { description, content, thumbnails } = media;

console.log("🚀 ~ renderMediaBox ~ media:", media);

function renderContent() {
return content.map((c: any) => {
if (c.url) {
if (c.url && c.content_type.indexOf('audio/') === 0) {
return (
<figure className="my-3">
{/* <audio controls src={ c.url }></audio> */}
<Button onClick={() => addToPlayListAndPlay(media)}>Play</Button>
</figure>
);
Expand All @@ -80,9 +77,9 @@ export function PodcastAdapter(props: any) {
}

return (
<div className="reading-content">
<div>
<div>{renderThumbnails()}</div>
<div className="pb-6">{renderContent()}</div>
<div>{renderContent()}</div>
<div
className="text-xs text-muted-foreground"
style={{ whiteSpace: "pre-line" }}
Expand Down

0 comments on commit 9548b45

Please sign in to comment.