htmlwidget with media elements not working in WebView
See original GitHub issueSome htmlwidgets might contain multimedia elements. They are currently not working properly in WebView.
For example, {gm}
can be used to generate music scores and playable audio with the following demo code:
library(gm)
m <-
# initialize a Music object
Music() +
# add a 4/4 time signature
Meter(4, 4) +
# add a musical line of four quarter notes
Line(list("C5", "D5", "E5", "F5"), list(1, 1, 1, 1))
show(m, to = c("score", "audio"))
Its HTML is simple:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div>
<p>
<img src="file12eef7447e4b9.png" style="max-width: 100%;"/>
</p>
<p>
<audio controls>
<source src="file12eef7447e4b9.mp3" type="audio/mp3"/>
</audio>
</p>
</div>
</body>
</html>
From the developer tools, the URIs seems to be correctly replaced with vscode-resource
scheme but still not working.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I tried adding
"SOURCE"
towatchedTags
but it does not work. Looks like it is a known limitation (https://github.com/microsoft/vscode/issues/54097). There are some other notebook-related issues regarding video/audio: https://github.com/microsoft/vscode/issues/118275, https://github.com/microsoft/vscode/issues/119127.<media>
element has been supported since 1.72. Closing.