Open biaocy opened 1 year ago
Hi there! I'm just start using vimejs today.
Ran into an minor issue which the player will never request the source when the entire html has no script tag. ( This is rather a rare case )
script
The bug triggering code was https://github.com/vime-js/vime/blob/1c5482eccd03be67a32a1589c023ce5d6194a9fd/packages/core/src/utils/network.ts#L53-L64
The last line will get a TypeError: Cannot read properties of undefined (reading 'parentNode') when there is no script tag in the entire html.
TypeError: Cannot read properties of undefined (reading 'parentNode')
In this condition, we may need to check if there is a script tag in the html and insert the script elsewhere when it didn't find one.
I can create a PR if you want.
Ran into this same issue again, and wasted another few hours.
Hi there! I'm just start using vimejs today.
Ran into an minor issue which the player will never request the source when the entire html has no
script
tag. ( This is rather a rare case )The bug triggering code was https://github.com/vime-js/vime/blob/1c5482eccd03be67a32a1589c023ce5d6194a9fd/packages/core/src/utils/network.ts#L53-L64
The last line will get a
TypeError: Cannot read properties of undefined (reading 'parentNode')
when there is noscript
tag in the entire html.In this condition, we may need to check if there is a script tag in the html and insert the script elsewhere when it didn't find one.
I can create a PR if you want.