I am desperately trying to get this flash animation to play after 5 seconds, but nothing I do seems to make it work.
This is the code I am using:
function waitFiveSec() {
window.setTimeout(startPlaying,5000);
}
function startPlaying() {
window.document.getElementById("FlashID")
}
I am then calling the waitFiveSec() function on the HTML document:
<body onload="waitFiveSec()">
This is for a class project where I have to do timeline based events, so I have never really used JavaScript before.
Can anyone help me on this?
HTML Flash Code:
<div id="animation">
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="365" height="295" id="FlashID" title="Tractor Animation">
<param name="movie" value="../Multimedia elements/Animations/Tractor Animation Opt 2.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="7.0.70.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<param name="autoplay" value="false" />
<param name="PLAY" value="false" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="../Multimedia elements/Animations/Tractor Animation Opt 2.swf" width="365" height="295">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="7.0.70.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<param name="autoplay" value="false" />
<param name="PLAY" value="false" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</p>
<p> </p>
</div>
</div>
Nothing seems wrong.
Only makee sure the file get loaded before you called from your html.
Related
In my web application am able to display the video from rtsp link on mozilla browser but not able to display on chrome. Please suggest me to solve this problem.
this is my code
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" events="True">
<param name="Src" value="rtsp://cameraipaddress" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<embed type="application/x-google-vlc-plugin" windowless="true" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="100%" height="100%" src="rtsp://admin:admin#x.x.x.x:111/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif" ></embed>
</OBJECT>
please help me guys this is my code and it works fine with me on the pc browsers but it need plugin to play it. I searched and tried a lot of methods to play this link live stream video but all of them are failed. This is the only code that plays the channel on the pc browsers and i need someone to help me or re-write the code so that can be played on pc and mobile devices browsers.
<html>
<head>
</head>
<body>
<object id='mediaPlayer1' width="640" height="360"
classid='clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="http://168.187.49.14:8080" />
<param name='animationatStart' value='true' />
<param name='transparentatStart' value='true' />
<param name='autoStart' value="false" />
<param name='showControls' value="true" />
<param name ="ShowAudioControls"value="true" />
<param name="ShowStatusBar" value="true" />
<param name='loop' value="false" />
<embed type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="640" height="360"
src="http://168.187.49.14:8080" autostart="true" designtimesp='5311' loop="false"> </embed>
</object>
</body>
</html>
I have two requirements:
I need to pop up a BrightCove video when an image is clicked on a desktop device.
For a mobile or tablet device the video should play in place.
I looked at the BrightCove API and saw nothing about doing a popup.
http://docs.brightcove.com/en/video-cloud/smart-player-api/index.html
Here is my code:
<!-- Start of Brightcove Player -->
<div style="display:none">
</div>
<!--
By use of this code snippet, I agree to the Brightcove Publisher T and C
found at https://accounts.brightcove.com/en/terms-and-conditions/.
-->
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="myExperience3331790840001" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="252" />
<param name="height" value="142" />
<param name="playerID" value="3328690588001" />
<param name="playerKey" value="AQ~~,AAABNxejUIE~,NjBzL2O70MzT703vlLFres21zOmPd7t1" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="#videoPlayer" value="3331790840001" />
</object>
<!--
This script tag will cause the Brightcove Players defined above it to be created as soon
as the line is read by the browser. If you wish to have the player instantiated only after
the rest of the HTML is processed and the page load is complete, remove the line.
-->
<script type="text/javascript">brightcove.createExperiences();</script>
<!-- End of Brightcove Player -->
Thanks in advance
Not sure if you already got this figured out, but there is something for a "lightbox" implementation which might be useful for you:
http://docs.brightcove.com/en/video-cloud/smart-player-api/samples/simple-lightbox-player.html
This might only be useful for playlists so you may have to be crafty, or contact Brightcove support and they'll probably be more helpful :).
I have a webpage with several swf movies that is created in dreamweaver and outputs several object tags like such:
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="160" height="600">
<param name="movie" value="Banners Template/Example_160x600.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="9.0.45.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="Banners Template/Example_160x600.swf" width="160" height="600">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="9.0.45.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
I would like to do the following:
The Swf animation runs once through on page load(This is
currently happening)
Once user clicks a 'Replay Movie' button,
the swf it is associated with will replay until the movie finishes.
I have been trying to find some code that can utilize javascript or jQuery to either reload the contents of the object tag or replay the swf with no success. How can I replay a swf movie on jquery button click?
demo: http://jsfiddle.net/tive/Ff7Mq/
demo2: http://jsfiddle.net/tive/J6WQm/
capture the event and change the source of the file.
Or use your swf object to render the div again.
var initVideos = function () {
var divs = $("ul li a");
// bind your click event to the divs
divs.click(function (e) {
e.preventDefault(); // use this when you're triggering anchor tags
flashembed("videoArea", $(this).prop("href"));
divs.removeClass("active");
$(this).addClass("active");
});
};
PROBLEM: when i press play the audio starts but the video does not.
CODE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JW Player for Flash</title>
</head><body>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("player","9.0.98","expressInstall.swf");
</script>
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="468" height="262">
<param name="movie" value="player-licensed.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=Bioshphere-Museum-of-Water.flv&image=preview.jpg" />
<object type="application/x-shockwave-flash" data="player-licensed.swf" width="468" height="262">
<param name="movie" value="player-licensed.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=video.flv&image=preview.jpg" />
<p>Get Flash to watch this video.</p>
</object>
</object>
</body>
</html>
LIVE EXAMPLE: http://solomongiles.com/mediamar/readme.html
Solutions?
Use the script found here, http://www.walkernews.net/2008/01/11/how-to-embed-flv-flash-in-wordpress-or-html/, with new player. It works in IE. I've also added allowfullscreen="true" allowsscriptaccess="always" after the size parameters. Plays in IE but no full screen. Help with this if you can please.
Works fine here in mac/safari 4.0.3.
However I do notice one thing - your flashvars for the object and param bits don't match up. They should be the same.
Also, you make want to look into a more flexible embedding solution such as SWFObject (it helps you do player detection and will let your document validate as XHTML as well)
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" width="640" height="480"><param name="flashvars" value="file=http://www.webiste.com/admin/php_uploads/video.flv&image=imgs/image_large.jpg" /><param name="movie" value="flvplayer/player.swf" /><embed src="flvplayer/player.swf" width="640" height="480" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=http://www.webiste.com/admin/php_uploads/video.flv&image=imgs/image_large.jpg" /></object>