Trouble embedding google drive video into HTA - embed

I have been working on a project for a few days now and hit a snag. I need to be able to embed a google drive video into an HTA application. I have looked everywhere for an answer and tried things such as the html5 method (which I have discovered is not supported by an hta application):
<video id="vid_1" width="720" height="480" autoplay="true">
<source src="https://drive.google.com/file/d/0BzRLxDgyDJqKUHViVkVPQlIwUGc/preview" type="video/mp4">
</video>
the google drive "auto-embed" method:
<iframe src="https://drive.google.com/file/d/0BzRLxDgyDJqKUHViVkVPQlIwUGc/preview" width="640" height="480"></iframe>
which came up with these errors and showed a blank screen:
http://imgur.com/a/JNLRM
and finally the good old fashion object/embed method:
<object type="video/mp4" data="https://drive.google.com/file/d/0BzRLxDgyDJqKUHViVkVPQlIwUGc/preview" width="340" height="280">
<param name="src" value="https://drive.google.com/file/d/0BzRLxDgyDJqKUHViVkVPQlIwUGc/preview" />
<param name="controller" value="true" />
<param name="autostart" value="true" />
</object>
and
<embed class="vidPlayer" autostart="true" src="https://drive.google.com/file/d/0BzRLxDgyDJqKUHViVkVPQlIwUGc/preview" type='video/mp4'/>
both of which simply showed a white screen.
Any ideas on how to accomplish this? I'm beginning to think it is impossible... The widths and lengths are completely optional, those are currently just placeholders in the code. Thanks for any and all help!

Try adding
<meta http-equiv="x-ua-compatible" content="IE=10"/>
or
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
inside the tag your HTA as without this it will run as if you are using IE6 even if you have the latest version of explorer installed.
Try adding it and then you should be able to get the tag working.
Note that newer versions of IE do not support VB script so adding this line may prevent VB script from running. You can either use Javascript instead or specify IE9.

Related

Embedding WMV file into Html and making it work in most of the browsers

I was asked to embed a wmv file into a piece of html.
So far so good, googling on how to do it quickly reveals that this is achieved using html tags object and embed.
My problem is that the sample I set up (shown below) is only working in IE. Chrome displays a a gray box with the message "This plugin is not supported", and following the help that shows up turns out chrome does not play NPAPI plug-ins anymore. Firefox shows nothing whatsoever, not even the object frame.
I researched a bit for workarounds to play it on chrome notwithstanding the fact google stopped supporting it sometime on 2015.
Messing with chrome://flags/#enable-npapi looked promising (as suggested here), but I can't find a enable Npapi among my flags.
Anyone knows how to have it working at least in Chrome, Firefox and IE ?
Is it possible to (freely) convert a wvm to Html5 video ?
<Html>
<Head></Head>
<Body>
<object id="MediaPlayer" width="192" height="190" type="video/x-ms-asf">
<param name="FileName"value="D:/myVideo.wmv">
<param name="autostart" value="false">
<param name="ShowControls" value="true">
<param name="ShowStatusBar" value="false">
<param name="ShowDisplay" value="false">
<embed type="application/x-mplayer2" src="D:/myVideo.wmv"
width="192" height="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0" />
</object>
</Body>
</Html>
There are any number of resources that will convert your wmv to mp4/ogg/other types of cross-browser format, including http://video.online-convert.com/convert-to-mp4, however thats beside the point.
If you want to display the video in html5, you should really use the <video>
tag.
An example of this would be
<!DOCTYPE html>
<html>
<body>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
Your browser does not support the video tag.
</video>
</body>
</html>

Why does Chrome keep attempting to mount mp4 files when it can't play them?

Why does Chrome keep attempting to mount mp4 files when it can't play them?
I am working on a PC Windows 7, IE 10, Chrome Version 25.0.1364.172.
It doesn't matter whether mp4 source line is before or after the object lines, Chrome seems to want to mount the mp4 files even if it can't play them.
I would like to play the mp4 file in IE 10 and the flash equivalent in Chrome, but I can't seem to make any combination of line ordering work.
So far, my only workaround is to use flash in both browsers. But why do I have to? I thought the html5 video tag was supported by both browsers?
Is this the correct way for a flash fallback to be coded, as it doesn't seem to be working. Is there a way to code this so I don't have to use flash in IE 10, which can play the mp4 files native?
Thanks for whatever assistance you can give me.
Here's a copy of the code generated at http://sandbox.thewikies.com/vfe-generator/
<!-- "Video For Everybody" http://camendesign.com/code/video_for_everybody -->
<video controls="controls" poster="Mark.jpg" width="640" height="480">
<source src="Mark.mp4" type="video/mp4" />
<object type="application/x-shockwave-flash" data="http://player.longtailvideo.com/player.swf" width="640" height="360">
<param name="movie" value="http://player.longtailvideo.com/player.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashVars" value="controlbar=over&image=Mark.jpg&file=Mark.mp4" />
<img alt="Mark" src="Mark.jpg" width="640" height="480" title="No video playback capabilities, please download the video below" />
</object>
</video>

IE9 not loading HTML5 mp4 video

My videos are working properly in almost every other browser except IE9. However, it may just be the configuration of IE9 that is causing this issue since on my other laptop with Windows 8 64-bit and IE10 64-bit, when i switch the browser mode to IE9, it works correctly. Here is the issue:
I am using Windows 7 64-bit, IE9 64-bit and 32-bit. My website has videos inside nested JQuery tabs. A tab is loaded at random. If one of the tabs containing a video is chosen to be initially loaded, the video shows up fine. If not, the video shows up blank, however, I am able to right-click where the video should be, select play, and then the video will play as normal and the controls appear.
Here is a link to the page that is experiencing the issue:
http://northernicefastpitch.com/index.php?page=team&team=1
Go to the Scalzitti tab, then select videos to find where the video should be displayed.
Here is my video code:
<video width="310" height="200" controls="controls">
<source src="teams/players/Scalzitti_Angela_19960603/videos/video1.mp4" type="video/mp4">
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="310" height="200">
<param name="src" value="teams/players/Scalzitti_Angela_19960603/videos/video1.mp4">
<param name="type" value="video/mp4">
<param name="controller" value="true">
<param name="autoplay" value="false">
<embed src="teams/players/Scalzitti_Angela_19960603/videos/video1.mp4" type="video/mp4" pluginspage="http://www.apple.com/quicktime/download/" width="310" height="200" controller="true" autoplay="false">
</object>
</video>
I am hosting this website on a linux Centos 6.3 server using NGINX so .htaccess files won't cause any problem. I have looked into the "IE9 HTML5 video visible only after cache clearing" post and it did not help me. I have probably tried about 30 different solutions and nothing has worked for me (which is why I am leaning towards IE9 is configured improperly on this laptop).
Please let me know if any of you are able to see the videos properly, with controls, on IE9. If it just this laptop that has the problem, I am definitely ok with that.
Thanks in advance.
John
I couldn't find any viable solution for this problem, but I did come up with a workaround. I was using this workaround only for IE, but after coming across a different problem with Chrome, I decided to use this on all browsers.
<div style="display:inline-block; margin-top:-14px; padding:5px;">
<video id="video14" width="310" height="200" style="background:#000000 url('images/play.png') no-repeat;" preload="none" controls>
<source src="videos/video1.mp4" type="video/mp4">
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="310" height="200">
<param name="src" value="videos/video1.mp4">
<param name="type" value="video/mp4">
<param name="controller" value="true">
<param name="autoplay" value="false">
<embed src="videos/video1.mp4" type="video/mp4" width="310" height="200" controller="true" autoplay="false"></embed>
</object>
</video>
<script>
document.getElementById('video14').onclick = function () {
document.getElementById('video14').play();
document.getElementById('video14').onclick = '';
document.getElementById('video14').style.background = '';
};
</script>
</div>
Above, I give my video an id and background image of a play button. I then set some javascript to play the video when clicked and also remove the onclick function as well as the background after it is clicked for the first time. I had to set preload="none" due to the issue with Chrome. Also, instead of using a background, you can use the poster attribute. If using the poster attribute, you don't need the additional javascript to remove the background.
Edit: I tried using poster attribute, but it didn't work in IE9, so sticking with the background for now. Also tried using video.js and poster but that also didn't work in IE9. In IE9, preview poster is still being displayed even with preload="none" when the tab with videos is chosen to be the default tab (default tab chosen at random). I am ok with this random occurrence though.

HTML5 Video with Flash fallback not working

I am trying to use a video element for HTML5 video and a nested element for Flash fallback. I have seen code using flowplayer to fallback to flash - but their documentation only shows a javascript interface. Is there any way to do something like what is below? To test, I remove the two lines with "source src="... "
If I have to use javascript for the flash, how would I code it in line with HTML5?
Thanks!
<video id="movie" width="640" height="360" preload controls>
<source src="./videos/fiddler-tradition.ogv" type="video/ogg; codecs=theora,vorbis" />
<source src="./videos/fiddler-tradition.mp4" />
<object id="flowplayer" width="640" height="360"
data="./flowplayer/flowplayer-3.2.16.swf"
type="application/x-shockwave-flash">
<param name="movie" value="./flowplayer/flowplayer-3.2.16.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars"
value='config={"clip":"./videos/fiddler-tradition.flv"}' />
</object>
</video>
The above non java flowplayer code (the code within the object tag) works fine when outside the video tags. I realize my issue is testing the fallback without html5 on my localhost machine while all I have available is an html5 browser. I will upload to the web and try on another pc with an older browser.
UPDATE: All is working - Testing in IE7, the code falls back to flash player. Yeah!

How to display video on html page in firefox

I did looked at this question, but the asker didn't got any reply. Still, I'm giving it a try.
I want to embed a video file on a html page. The code works fine on IE but doesn't work on firefox.
The code:
<object id="WMPlay" width="640" height="480" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,70" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject">
<param name="URL" value="XYZ.wma" />
<param name="AutoStart" value="false" />
<embed name="WMplay" width="640" height="480" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
src="XYZ.wma" allowchangedisplaysize="True" showcontrols="1"
autostart="false" showdisplay="1" showstatusbar="1">
</embed>
</object>
Please note that I'm not allowed to display video using any third party tool (like flash).
Can someone please tell what am I missing? Or a better solution..something which is browser independent... :)
Looks like firefox needs a plugin, check this test page:
http://plugindoc.mozdev.org/testpages/wmp11.html
That's probably an issue with .wmv extension, which is a Microsoft proprietary format.
You should convert your video to a more "web-friendly" format, and use this code to ensure cross-browser/html version compatibility:
http://camendesign.com/code/video_for_everybody
Fire fox only displays .ogg and WebM...
www.w3schools.com/tags/tag_video.asp