Skip to content

Commit

Permalink
Rename image-preview extension to media-preview (#162093)
Browse files Browse the repository at this point in the history
Fixes #162092

Also removes `aac` from the list of supported audio formats
  • Loading branch information
mjbvz authored Sep 28, 2022
1 parent fd06e2f commit c2a2ad4
Show file tree
Hide file tree
Showing 33 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion build/gulpfile.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const compilations = [
'gulp/tsconfig.json',
'html-language-features/client/tsconfig.json',
'html-language-features/server/tsconfig.json',
'image-preview/tsconfig.json',
'ipynb/tsconfig.json',
'jake/tsconfig.json',
'json-language-features/client/tsconfig.json',
Expand All @@ -55,6 +54,7 @@ const compilations = [
'markdown-language-features/server/tsconfig.json',
'markdown-language-features/tsconfig.json',
'markdown-math/tsconfig.json',
'media-preview/tsconfig.json',
'merge-conflict/tsconfig.json',
'microsoft-authentication/tsconfig.json',
'npm/tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion build/npm/dirs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ exports.dirs = [
'extensions/gulp',
'extensions/html-language-features',
'extensions/html-language-features/server',
'extensions/image-preview',
'extensions/ipynb',
'extensions/jake',
'extensions/json-language-features',
'extensions/json-language-features/server',
'extensions/markdown-language-features/server',
'extensions/markdown-language-features',
'extensions/markdown-math',
'extensions/media-preview',
'extensions/merge-conflict',
'extensions/microsoft-authentication',
'extensions/notebook-renderers',
Expand Down
16 changes: 0 additions & 16 deletions extensions/image-preview/README.md

This file was deleted.

File renamed without changes.
29 changes: 29 additions & 0 deletions extensions/media-preview/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Media Preview

**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.

## Features

This extension provides basic preview for images, audio and video files.

### Supported image file extensions

- `.jpg`, `.jpe`, `.jpeg`
- `.png`
- `.bmp`
- `.gif`
- `.ico`
- `.webp`
- `.avif`


### Supported audio formats

- `.mp3`
- `.wav`
- `.ogg`

### Supported video formats

- `.mp4` (does not support `aac` audio track)
- `.webm` (vp8 only)
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "image-preview",
"name": "media-preview",
"displayName": "%displayName%",
"description": "%description%",
"extensionKind": [
Expand Down Expand Up @@ -50,7 +50,7 @@
"priority": "builtin",
"selector": [
{
"filenamePattern": "*.{mp3,wav,ogg,aac}"
"filenamePattern": "*.{mp3,wav,ogg}"
}
]
},
Expand Down Expand Up @@ -93,10 +93,10 @@
}
},
"scripts": {
"compile": "gulp compile-extension:image-preview",
"watch": "npm run build-preview && gulp watch-extension:image-preview",
"compile": "gulp compile-extension:media-preview",
"watch": "npm run build-preview && gulp watch-extension:media-preview",
"vscode:prepublish": "npm run build-ext",
"build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:image-preview ./tsconfig.json",
"build-ext": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:media-preview ./tsconfig.json",
"compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none",
"watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"displayName": "Image Preview",
"description": "Provides VS Code's built-in image preview",
"displayName": "Media Preview",
"description": "Provides VS Code's built-in previews for images, audio, and video",
"customEditor.audioPreview.displayName": "Audio Preview",
"customEditor.imagePreview.displayName": "Image Preview",
"customEditor.videoPreview.displayName": "Video Preview",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ suite('vscode API - env', () => {
test('env.remoteName', function () {
const remoteName = env.remoteName;
const knownWorkspaceExtension = extensions.getExtension('vscode.git');
const knownUiAndWorkspaceExtension = extensions.getExtension('vscode.image-preview');
const knownUiAndWorkspaceExtension = extensions.getExtension('vscode.media-preview');
if (typeof remoteName === 'undefined') {
// not running in remote, so we expect both extensions
assert.ok(knownWorkspaceExtension);
Expand Down

0 comments on commit c2a2ad4

Please sign in to comment.