mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
fix(dash): [PKG-DASH-05] synchronize SDK events and own refresh lifecycle
This commit is contained in:
1 parent
2ad00730ee
commit
a9cf50bc4e
24 files changed
+3913
-40
No files matched your search
@@ -11,7 +11,8 @@ import { loadPackage } from './load.js'
|
||||
async function factoryFromBytes(bytes, module) {
|
||||
if (module)
|
||||
return (await import(`data:text/javascript;base64,${Buffer.from(bytes).toString('base64')}`)).default
|
||||
const context = { module: { exports: {} } }
|
||||
// VM's implicit console does not forward warnings to the test process.
|
||||
const context = { module: { exports: {} }, console }
|
||||
context.exports = context.module.exports
|
||||
vm.runInNewContext(bytes.toString(), context, { timeout: 5000 })
|
||||
assert.equal(typeof context.module.exports, 'function')
|
||||
|
||||
Reference in new issue
Block a user