.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.img({
src:url+'?'+newDate().getTime()// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+newDate().getTime()// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
}).on(DOM.EventType.LOAD,()=>{
if(scrollbar){
scrollbar.onElementInternalDimensions();
...
...
@@ -106,7 +107,7 @@ export class ResourceViewer {
.style({padding:0,margin:0})// We really do not want any paddings or margins when displaying PDFs
.element('object')
.attr({
data:url+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
data:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
width:'100%',
height:'100%',
type:mime
...
...
@@ -120,7 +121,7 @@ export class ResourceViewer {
.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.element('audio')
.attr({
src:url+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
text:nls.localize('missingAudioSupport',"Sorry but playback of audio files is not supported."),
controls:'controls'
}).on(DOM.EventType.LOAD,()=>{
...
...
@@ -137,7 +138,7 @@ export class ResourceViewer {
.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.element('video')
.attr({
src:url+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
text:nls.localize('missingVideoSupport',"Sorry but playback of video files is not supported."),
returnTPromise.wrapError<void>('Invalid editor input. Binary resource editor requires a model instance of BinaryResourceEditorModel.');
if(!(resolvedModelinstanceofBinaryEditorModel)){
returnTPromise.wrapError<void>('Invalid editor input. Binary resource editor requires a model instance of BinaryEditorModel.');
}
// Assert that the current input is still the one we expect. This prevents a race condition when loading takes long and another input was set meanwhile