I'm using VSTFS 2018 Version 16.131.28226.3
When I edit a wiki page on one of my repositories and drag and drop a video on the page, it successfully adds the video to the .attachments directory and I add this to the 'src' property of the video but no video is ever displayed. The examples on Microsoft's tutorials on TFS surrounding adding html video to a wiki all involve external video sources.
Can anyone confirm what I'm trying to do actually works?
<video width=400 controls>
<source src=".attachments/InvoiceSearch0001-2634-dd51e9fa-ce57-4b0f-a5d6-c9450a9e6036.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
I got it to work by doing the following:
the format I was using above doesn't work
Go to Microsoft Docs for TFS Wiki and follow the format they show for adding HTML video or just refer to example below.
For some reason I can't use a relative path like I could for an image.
How to get path of video:
Go to the repository of your wiki and browse the video file within the .attachments folder. You'll see a little link for "Click to download file to your computer".
Right click on the link and copy link.
Paste this link replacing the src below
Example shown from MS docs:
<video src="https://sec.ch9.ms/ch9/7247/7c8ddc1a-348b-4ba9-ab61-51fded6e7247/vstswiki_high.mp4" width=400 controls>
Related
I have given a source in a Iframe tag, my is issue is that when the page loads on IE the download begins automatically and it generally happens on IE installed on windows 8.
<div> <iframe src="../../Images/Sample.pdf" width="800px" height="800px" ></iframe> </div>
It's downloaded probably because there is not Adobe Reader plug-in
installed. In this case IE (it doesn't matter which version) doesn't
know how to render it and it'll simply download file (Chrome, for
example, has its own embedded PDF renderer).
That said. is not best way to display a PDF (do not forget
compatibility with mobile browsers, for example Safari). Some browsers
will always open that file inside an external application (or in
another browser window). Best and most compatible way I found is a
little bit tricky but works on all browsers I tried (even pretty
outdated):
Keep your but do not display a PDF inside it, it'll be filled
with an HTML page that consists of an tag. Create an HTML
wrapping page for your PDF, it should look like this:
<html>
<body>
<object data="your_url_to_pdf" type="application/pdf">
<embed src="your_url_to_pdf" type="application/pdf" />
</object>
</body>
</html>
Of course you still need the appropriate plug-in installed in the
browser. Also take a look to this post if you need to support Safari
on mobile devices.
1st. Why nesting inside ? You'll find answer here on
SO. Instead of nested tag you may even provide a custom
message for your users (or a built-in viewer, see next paragraph).
2nd. Why an HTML page? So you can provide a fallback if PDF viewer
isn't supported. Internal viewer, plain HTML error messages/options
and so on...
It's tricky to check PDF support so you may provide an alternate
viewer for your customers, take a look to PDF.JS project, it's pretty
good but rendering quality - for desktop browsers - isn't as good as a
native PDF renderer (I didn't see any difference in mobile browsers
because of screen size, I suppose).
See also: HTML embedded PDF iframe
I am trying to embed a local mp4 file that resides on the same server where IIS runs but on a different disk and is not part of the site (too many videos to do that). For example, my site is under C:\inetpub\wwwroot\Site while mp4 files I'd like to play are under D:\Videos. User running the site has access to this location. When I put full path to the file in the source, video does not play. What is the best way to handle this?
<video width="640" height="360" controls="controls">
<source src="D:/Videos/VideoFile.mp4" type="video/mp4" />
</video>
You don't have the right to do that, you need virtual path and not a physical one just put mp4 file inside your project directory and then specify path as...
Try using 'http://[Your server]/directory/yourmp4.mp4' or use Server.MapPath() as src of your object.
and make sure your browser supports video tag as it is a html5 tag.
I have tried everything I possibly could, but I was not able to solve this. I am trying to display an mp4 video using an HTML5 video element in IE9 and IE10. In IE9 I get a blank square where the video is supposed to show and in IE10 it says "Invalid Source". It plays fine in Chrome.
The video displays fine within a simple HTML file, but not in my ASP.net MVC project, whether run locally or on a web server. I have the file placed in my root folder (same folder as the web.config)
Here is my code in my ASP.NET MVC index.cshtml:
<video controls style="position:inherit" >
<source src="ExplainerVideo.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
</video>
Any ideas?
Thanks.
Try taking away the codec and letting the browser decide for itself whether it can play it or not.
e.g. <source src="ExplainerVideo.mp4" type='video/mp4' />
Failing that, try an absolute URL for the video as I've noticed this causing issues on IE before.
I am trying load a YouTube video into a HTML 5 tag.
The problem I am having is I do not know what the “src” property should be. Using the URL for a video on YouTube does not seem to work, that URL seems to retrieve an entire page rather than just a video file.
I have been able to copy and paste YouTube’s own tag (by viewing the page source), that they use on their pages, but this is not a very efficient or long term solution. Is there a better solution?
I have tried to use YouTube’s API, but no matter what I do, it seems always to pull in the flash player version of the player (which of course won’t work for iOS.) Am I missing something obvious here?
This blog post might help: http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
The suggestion is to use this code:
<iframe class="youtube-player" type="text/html" width="640" height="385"
src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>
The iframe will autodetect HTML5 capabilities and use them; if not, it uses Flash as fallback.
In rails is there anything available that if a user uploads a document to me through paperclip (like maybe a .doc or .pdf or .odf, etc.) That i can embed there document into my page (Like perhaps is there some sort of gem available to handle that
I found a solution to the pdf part of my problem.
theres a simple html line that solves this
<iframe src="thispdf.pdf" style="width:718px; height:700px;" frameborder="0"></iframe>
I've tried the same with .odt, but this just downloads the file (maybe this was more of an html problem than rails) -- note i only tested this in chrome
By embed do you mean display? There's no native way to display any of those documents in html, so you will have to either somehow convert them to html or use another layer, like flash or a third-party tool, to do the embedding for you.
Maybe one of the embed.ly providers can give a nice display for your documents.
I used the following code to make mine work in the view (with the example object #person) using the most current (as of 2013) Google Docs embedded pdf code specifications:
<iframe src="https://docs.google.com/viewer?url=http://www.mysite.com/<%= #person.pdf.url %>&embedded=true"
width="100%" height="800" frameborder="0" >
<p>Your browser does not support iframes.</p>
</iframe>