---
title: "Discussion on \"js 获取视频封面\" | Hashnode"
description: "Discussion on \"js 获取视频封面\". // 获取封面\n    drawVideo(video) {\n      return new Promise((res, rej) => {\n        const canvas = document.createElement('canvas')\n        const ctx = canvas.getContext('2d')\n        canvas.width = video.width\n        canvas.height = video.height\n      ..."
url: "https://hashnode.com/posts/js-1/660cb8a36b946d8284fc95b5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [js 获取视频封面](https://zmblog.hashnode.dev/js-1?utm_source=hashnode&utm_medium=feed)

// 获取封面 drawVideo(video) { return new Promise((res, rej) => { const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') canvas.width = video.width canvas.height = video.height ...

Apr 3, 2024 · 1 min read · zmblog.hashnode.dev  
Read the article

-   [#js](https://hashnode.com/tag/js)

## Written by

[明](https://hashnode.com/@zm144)

@zm144

  
[View profile](https://hashnode.com/@zm144)

learn

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
