Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode >= 1.13 greys out audio controls in previewHTML? #32540

Closed
ghost opened this issue Aug 15, 2017 · 6 comments
Closed

VSCode >= 1.13 greys out audio controls in previewHTML? #32540

ghost opened this issue Aug 15, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded webview Webview issues
Milestone

Comments

@ghost
Copy link

ghost commented Aug 15, 2017

  • VSCode Version: >= 1.13
  • OS Version: OSX, Ubuntu

Steps to Reproduce:

  1. Use any extension that will allow you to preview HTML (e.g. Jupyter or HTML Preview)
  2. Render:
    <audio controls autoplay src="http://media.w3.org/2010/07/bunny/04-Death_Becomes_Fur.oga"></audio>
  3. Observe that the controls are greyed out and the audio does not play

This is broken from 1.13 on, before that previewing audio just worked.

Reproduces without extensions: unknown

@DickvdBrink
Copy link
Contributor

DickvdBrink commented Aug 15, 2017

image

I get the above when opening a markdown as html; probably due to this.
The markdown code has a few options to disable the security options; maybe something like that has to be implemented in the extension to?

So I guess it is more a security feature that it doesn't work.

@ghost
Copy link
Author

ghost commented Aug 15, 2017

I don't think it's CSP related, the following renders the image ok:

<audio controls autoplay src="http://media.w3.org/2010/07/bunny/04-Death_Becomes_Fur.oga"></audio>
<img src='http://www.w3.org/html/logo/downloads/HTML5_Logo_128.png'/>

@ghost
Copy link
Author

ghost commented Aug 16, 2017

Oh, from the same version on, it seems that video is also not working (still using the HTML preview to check the rendering)?

<audio controls autoplay src="http://media.w3.org/2010/07/bunny/04-Death_Becomes_Fur.oga"></audio>
<video controls autoplay>
    <source src="http://media.w3.org/2010/05/sintel/trailer.mp4"
         type='video/mp4; codecs="avc1, mp4a"'>
    <source src="http://media.w3.org/2010/05/sintel/trailer.ogv"
         type='video/ogg; codecs="theora, vorbis"'>
</video>
<img src='http://www.w3.org/html/logo/downloads/HTML5_Logo_128.png'/>

@mjbvz
Copy link
Collaborator

mjbvz commented Aug 16, 2017

Yes, the markdown preview would block http video by default but the previewHtml content should not have any Content Security policy set. Looking at the network requests for the webview, I do see the video file being requested successfully but there seems to be some error with the playback inside the webview. I'll investigate further

@mjbvz mjbvz added webview Webview issues bug Issue identified by VS Code Team member as probable bug labels Aug 16, 2017
@mjbvz mjbvz added this to the December 2017/January 2018 milestone Dec 19, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 19, 2017

This appears to be fixed in VS Code 1.20 insiders builds:

screen shot 2017-12-19 at 3 21 38 pm

Let me know if you are still seeing this in html previews

@mjbvz mjbvz closed this as completed Dec 19, 2017
@roblourens roblourens added the verified Verification succeeded label Feb 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 4, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 17, 2018

Actually, I just learned that we strip out ffmpeg and other media support from our release builds. This is by-design and something we will not change, but it does mean that many types of media playback will never be supported in webviews inside vscode

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

3 participants