mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
refactor(mediabunny): [PKG-MB-05] own video iterators, frame pools and rendering
This commit is contained in:
1 parent
5d0b128483
commit
9d037dcbf9
27 files changed
+3652
-595
No files matched your search
@@ -145,9 +145,10 @@ for (const implementation of implementations) {
|
||||
const video = canvas.engine.video
|
||||
if (video.videoSink) {
|
||||
const times = new WeakMap()
|
||||
const canvases = video.videoSink.canvases.bind(video.videoSink)
|
||||
video.videoSink.canvases = (...args) => {
|
||||
const iterator = canvases(...args)
|
||||
const prototype = Object.getPrototypeOf(video.videoSink)
|
||||
const canvases = prototype.canvases
|
||||
prototype.canvases = function (...args) {
|
||||
const iterator = canvases.apply(this, args)
|
||||
const next = iterator.next.bind(iterator)
|
||||
iterator.next = async (...values) => {
|
||||
const result = await next(...values)
|
||||
|
||||
Reference in new issue
Block a user